Skip to content

New editor#981

Merged
EdiWang merged 3 commits into
masterfrom
new-editor
Jul 4, 2026
Merged

New editor#981
EdiWang merged 3 commits into
masterfrom
new-editor

Conversation

@EdiWang

@EdiWang EdiWang commented Jul 4, 2026

Copy link
Copy Markdown
Owner

No description provided.

EdiWang added 3 commits June 30, 2026 10:42
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.
Copilot AI review requested due to automatic review settings July 4, 2026 02:32
@EdiWang EdiWang merged commit f39dc9c into master Jul 4, 2026
2 checks passed
@EdiWang EdiWang deleted the new-editor branch July 4, 2026 02:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md to 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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants