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 hy: Translations = {
|
||||
confirmLeaveUnsaved: 'Կան չպահված փոփոխություններ։ Այնուամենայնիվ դուրս գա՞լ։',
|
||||
promptLinkUrl: 'URL',
|
||||
promptImageUrl: 'Նկարի URL',
|
||||
promptEmbedUrl: 'Ներդրման URL',
|
||||
htmlEditorInvalidHtml: 'Այս HTML-ը ունի չփակված կամ չհամընկնող թեգ։ Ուղղեք նախքան տեսողական խմբագրիչին վերադառնալը։',
|
||||
htmlEditorCode: 'Կոդ',
|
||||
htmlEditorPreview: 'Նախադիտում',
|
||||
lastSaved: 'Վերջին պահպանումը',
|
||||
|
||||
Reference in New Issue
Block a user