feat(static-pages): rich text extensions + HTML-mode validation
Milestone 3 of the Static Pages Module sprint. - MarketplaceHtmlEditorComponent toolbar: horizontal rule (insertHorizontalRule), code block (formatBlock -> PRE), embed (prompt for a URL, insert a sandboxed <iframe sandbox="allow-scripts allow-same-origin" loading="lazy">, same prompt-based UX as the existing link/image commands - no new dependency, consistent with the documented no-external-rich-text- library decision). - toggleCode() now validates raw HTML via schema/validators/primitives' validateHtml (added in M1) before committing it back to the visual surface; on failure it stays in code mode with an inline error instead of silently writing malformed markup into the contenteditable surface. Error clears on the next edit. - i18n: builder.promptEmbedUrl, builder.htmlEditorInvalidHtml in interface + en/ru/hy. Gate: tsc --noEmit, npm test (57/57), arch:check, build all green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -551,6 +551,8 @@ export const en: Translations = {
|
||||
confirmLeaveUnsaved: 'You have unsaved changes. Leave anyway?',
|
||||
promptLinkUrl: 'URL',
|
||||
promptImageUrl: 'Image URL',
|
||||
promptEmbedUrl: 'Embed URL',
|
||||
htmlEditorInvalidHtml: 'This HTML has an unclosed or mismatched tag. Fix it before switching back to the visual editor.',
|
||||
htmlEditorCode: 'Code',
|
||||
htmlEditorPreview: 'Preview',
|
||||
lastSaved: 'Last saved',
|
||||
|
||||
Reference in New Issue
Block a user