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 ru: Translations = {
|
||||
confirmLeaveUnsaved: 'Есть несохранённые изменения. Всё равно уйти?',
|
||||
promptLinkUrl: 'URL',
|
||||
promptImageUrl: 'URL изображения',
|
||||
promptEmbedUrl: 'URL для встраивания',
|
||||
htmlEditorInvalidHtml: 'В этом HTML есть незакрытый или несовпадающий тег. Исправьте перед возвратом к визуальному редактору.',
|
||||
htmlEditorCode: 'Код',
|
||||
htmlEditorPreview: 'Предпросмотр',
|
||||
lastSaved: 'Последнее сохранение',
|
||||
|
||||
Reference in New Issue
Block a user