Repository navigation
Spike - New Html Editor Provider - #7593
Open
mitchelsellers wants to merge 4 commits into
Open
mitchelsellers wants to merge 4 commits into
mitchelsellers wants to merge 4 commits into
Conversation
Add Dnn.RichTextEditor, an MIT-licensed HtmlEditorProvider built on Jodit 4.18.10, as the replacement for the CKEditor 4 provider. - EditorControl renders a textarea, handles postback like the CKEditor control, and works within UpdatePanel partial postbacks. - dnn.richtexteditor.js exposes an editor-neutral client API (create, get, onReady, sync, resize, configure) and configures Jodit to preserve existing HTML (no <b>/<i> rewriting, no empty-element removal, iframes kept). - New installs default to the new provider; the package only registers it, so upgraded sites keep CKEditor until they switch. - EditHtml.ascx resizes through the new API and only calls CKEDITOR when it is loaded. Image browse/upload, page links and the settings control follow in later changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ditor Add a FileBrowser Web API (/API/RichTextEditor/FileBrowser) that speaks Jodit's connector protocol and wire the editor's file browser and uploader to it. - Connector: permissions, folders, files, folderCreate and fileRemove. Folders need BROWSE or READ, uploads WRITE or ADD, folder creation and file deletion WRITE; all checked server-side per request, with anti-forgery validation on every POST. - Upload: saves to the current folder, or for drops/pastes into the editor to the provider's uploadFolder (portal root by default), never overwriting; the file manager still enforces allowed extensions, content checks and quota. - File: anonymous GET that checks READ and redirects to the folder provider's URL, used for secure, database and cloud folders. - Rename, move, folder delete and image crop/resize are refused by the service and hidden in the browser. - The adapter sets method and headers on Jodit's permissions request, which otherwise inherits a GET default. - Add DotNetNuke.Tests.RichTextEditor with unit tests for path normalization, name rules and the permission checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a Pages Web API (/API/RichTextEditor/Pages/List) and an Insert Page Link toolbar button that links to pages of the current site. - The endpoint returns the pages the signed-in user can view, in page tree order and the current language, including hidden and link-type pages but not deleted ones. Pages with links disabled are listed but not selectable. - URLs use the same friendly URL format as the CKEditor provider's page links, made site-relative so they work under every portal alias. - The button's popup has a searchable, indented page list; picking a page inserts a link at the caret, links the selected text or image, or re-points the link under the cursor. The list is fetched once per page and shared by all editors. - Button and popup text are localizable via Editor.resx. - Add unit tests for the page list and URL handling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a settings control for the HTML Editor Manager and apply its settings in the editor and upload service. - Settings.ascx (superusers only) edits settings for all sites or for one site: default toolbar, default upload limit, upload folder, and a toolbar preset and upload limit (KB) per role. - Settings are stored in host and portal settings (role maps as JSON) and resolved site -> all sites -> web.config attribute -> default. Users in several roles get the largest toolbar and limit; without role settings administrators get the full toolbar, as with CKEditor. - The editor control picks the toolbar from these settings, and the upload service uses the configured upload folder and rejects files over the user's limit. - Register Settings.ascx as the provider's settingsControlPath in release.config, development.config and the package manifest. - Install/10.04.00.SqlDataProvider copies CKEditor's role toolbars, role upload limits (bytes to KB) and site upload folders from CKE_Settings when that table exists, never overwriting existing settings. Uninstall.SqlDataProvider removes the provider's settings. - Add unit tests for settings resolution, storage and migrated values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
If we are going the Jodit direction, we already have dnn-richtext wrapping it into a webcomponent https://dnncommunity.github.io/dnn-elements/?path=/docs/elements-richtext--docs And I was planning to rewrite the file manager to be provider-based so it could be used by module developers for file navigation/upload in their solutions, used in dnn-richtext and as its current module. This would avoid a lot of duplication. Opinions? |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is a WIP item, more than anything to get it into automated builds for review, more to come.
DO NOT MERGE at this time, and it isn't ready for review.
Interesting Discoveries
Some interesting discoveries and notes that we will want to validate with regard to the overall functionality, as well as what exactly is changing here.