feat(post-form): EasyMDE editor + /post-scoped ESM bundle (U3)
Add a page-scoped js/src/post-form.js bundle (built ESM + code-splitting so U4's heic-to becomes a deferred chunk) loaded only by post-form.html.twig via a new base head_assets block. EasyMDE replaces the bare textarea with a minimal toolbar (bold/italic/list/link/preview), FA-free via CSS glyphs, and syncs codemirror.save() on change + capture-phase submit so the inline required-field validator and payload see the live value. Refs R7, R15, KTD2, KTD3.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* /post form bundle CSS. U3 scope: make the EasyMDE editor usable without the
|
||||
* FontAwesome dependency (toolbar glyphs supplied here). Field Notes theming,
|
||||
* mobile layout, and the "More options" disclosure land in U5.
|
||||
*/
|
||||
|
||||
/* EasyMDE toolbar glyphs — replace the FontAwesome icons EasyMDE expects. */
|
||||
.editor-toolbar .mde-btn::before {
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-family: inherit;
|
||||
}
|
||||
.editor-toolbar .mde-bold::before { content: 'B'; font-weight: 700; }
|
||||
.editor-toolbar .mde-italic::before { content: 'I'; font-style: italic; }
|
||||
.editor-toolbar .mde-ul::before { content: '\2022\2002\2014'; } /* • — */
|
||||
.editor-toolbar .mde-link::before { content: '\1F517'; } /* 🔗 */
|
||||
.editor-toolbar .mde-preview::before { content: '\1F441'; } /* 👁 */
|
||||
|
||||
.EasyMDEContainer .CodeMirror {
|
||||
min-height: 180px;
|
||||
}
|
||||
Reference in New Issue
Block a user