New editor#981
Merged
Merged
Conversation
Update AGENTS.md and the ProseMirror migration task record to reflect that TinyMCE has been fully removed. The docs now describe Moonglade.Editor as the active HTML editor path, mark cleanup/documentation tasks complete, and record post-migration verification and risk notes as historical/completed status.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR replaces the admin HTML post editor (previously TinyMCE) with a first-party ProseMirror-based editor consumed as prebuilt static assets (Moonglade.Editor), while keeping the existing Markdown/Monaco editor path intact.
Changes:
- Integrates
createMoongladeEditor(...)for HTML post editing via dynamic ESM import and a host<div>+ hidden<textarea>bridge. - Removes TinyMCE package/reference remnants and related custom CSS selectors/assets.
- Adds a detailed migration task record and updates
AGENTS.mdto reflect the new editor and code-sample language maintenance point.
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Moonglade.Web/wwwroot/lib/moonglade-editor/moonglade-editor.css | Adds styling for the new ProseMirror-based editor UI. |
| src/Moonglade.Web/wwwroot/js/app/admin.editpost.editor.mjs | Switches HTML editor initialization from TinyMCE to dynamic import + createMoongladeEditor. |
| src/Moonglade.Web/wwwroot/js/app/admin.editor.module.mjs | Centralizes code-sample languages and updates submit-time syncing for the new editor. |
| src/Moonglade.Web/wwwroot/css/tinymce-custom.css | Removes TinyMCE-specific editor content styling. |
| src/Moonglade.Web/wwwroot/css/tinymce-custom-dark.css | Removes TinyMCE dark theme override styling. |
| src/Moonglade.Web/wwwroot/css/base.css | Removes TinyMCE dark-theme selector override. |
| src/Moonglade.Web/wwwroot/css/admin.css | Updates admin editor layout styles for the new HTML editor host element. |
| src/Moonglade.Web/Pages/Admin/EditPost.cshtml | Replaces the HTML <textarea> editor surface with an editor host container + hidden textarea. |
| src/Moonglade.Web/Moonglade.Web.csproj | Drops TinyMCE package reference and related content configuration. |
| docs/tasks/task-prosemirror-editor-migration.md | Adds a migration/task record documenting the editor replacement plan and progress. |
| AGENTS.md | Updates stack/docs guidance to reflect Moonglade.Editor replacing TinyMCE for HTML post editing. |
Comment on lines
+1
to
+8
| .mg-editor { | ||
| background-color: var(--bs-body-bg, #fff); | ||
| border-color: var(--bs-border-color, #dee2e6); | ||
| color: var(--bs-body-color, #212529); | ||
| min-height: 12rem; | ||
| overflow: hidden; | ||
| resize: vertical; | ||
| } |
Comment on lines
+69
to
75
| async function ensureMoongladeHtmlEditor() { | ||
| if (!htmlEditorModulePromise) { | ||
| htmlEditorModulePromise = import(htmlEditorModulePath); | ||
| } | ||
|
|
||
| return await htmlEditorModulePromise; | ||
| } |
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.
No description provided.