- golem15-journal-blogeditor (BlogEditorElement): light-DOM element with a TipTap WYSIWYG tab and a Source tab that edits the exact HTML string - The value is the exact served string until a user edit; external values go in with emitUpdate false; summer-change fires on user edits only and an echo set is a no-op - StarterKit without the trailing node, links without target, rel or class; injectCSS false with the ProseMirror base rules in blogeditor.css under the element tag, colours from --c-* only - Committed bundle embedded through admin.go; vitest smoke on an imported post fixture (footer, style block, spans, figure, table, entities)
11 lines
337 B
TypeScript
11 lines
337 B
TypeScript
import './blogeditor.css'
|
|
import { BlogEditorElement, TAG } from './element'
|
|
|
|
// The admin SPA loads this script once on every admin page (D-13); defining
|
|
// the tag twice would throw, so a second evaluation is a no-op.
|
|
if (!customElements.get(TAG)) {
|
|
customElements.define(TAG, BlogEditorElement)
|
|
}
|
|
|
|
export { BlogEditorElement, TAG }
|