Replace WYMEditor with the RDFa editor for XMLLiteral editing#336
Open
namedgraph wants to merge 3 commits into
Open
Replace WYMEditor with the RDFa editor for XMLLiteral editing#336namedgraph wants to merge 3 commits into
namedgraph wants to merge 3 commits into
Conversation
- vendor the RDFa editor XSLT modules under xsl/rdfa-editor/ (synced from the RDFa-Editor repo) and import them from client.xsl - render XMLLiteral form controls as editable div.rdfa-editor-content regions with hidden ol/lt inputs (imports/default.xsl) - create the editor state container in the client main template; full chrome bring-up on the first region, per-region init afterwards via the upstream local:init-editor/local:init-region seams (form.xsl) - serialize canonicalized editor content into the ol input in ldh:FormPreSubmit - run the ldh:FormPreSubmit pass before ldh:parse-rdf-post in the block POST and generic row-form submit handlers (previously the param defaults parsed the inputs before the pass could sync them, dropping the empty ol and tripping the ldh:XHTML MissingValue constraint) and canonicalize XMLLiterals in the request body (block.xsl, form.xsl) - chain body onmousemove to the editor's sweep-selection tracker which it shadowed by import precedence (navigation.xsl) - host the singleton toolbar in a per-document editor-bar below the action bar (document.xsl slot + local:toolbar-host override); sticky, matching action-bar chrome, hidden while no editable region is open along with the editor breadcrumb footer (bootstrap.css) - drop the WYMEditor assets from layout.xsl; load rdfa-editor.css under the same conditions instead Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Move border to action-bar bottom (border-top on editor-bar was hidden under action-bar's higher z-index) - Flex-center editor-bar content (Bootstrap navbar-inner has min-height: 50px with no vertical centering) - Fix select vertical alignment via auto margins (Firefox ignores align-items: center on native select) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Click anywhere on .main content to enter edit mode (skips if text selected) - Autosave XMLLiteral on focusout unless focus moved to toolbar/editor UI - Hide .btn-edit on XHTML blocks (entry point is now content click) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the jQuery/iframe WYMEditor with the XSLT/SaxonJS RDFa editor for editing
rdf:XMLLiteralvalues (ldh:XHTMLblocks), per the upstreamdocs/ldh/MIGRATION.mdcontract. The editor modules are vendored byte-identical underxsl/rdfa-editor/and imported fromclient.xslat lower precedence; all LDH-specific behavior lives in LDH's own layer as overrides.imports/default.xsl): XMLLiteral values render as editablediv.rdfa-editor-contentregions with hiddenol/ltinputs instead of a serializedtextarea.wymeditorclient.xsl,form.xsl): editor state container created in themaintemplate; the first rendered region brings up the full editor chrome vialocal:init-editor, subsequent regions init vialocal:init-regiondocument.xsl,form.xsl,bootstrap.css): the singleton toolbar mounts in a per-documentdiv.editor-barbelow the action bar (LDH pages have nonavelement, which upstream's default host lookup expects); sticky, styled to match the action bar, hidden together with the editor breadcrumb footer while no editable region is openform.xsl,block.xsl):ldh:FormPreSubmitserializes the canonicalized region content into theolinput. The block-POST and generic row-form submit handlers previously parsed the RDF/POST inputs inxsl:paramdefaults — before theFormPreSubmitpass could sync them — which dropped the emptyoland tripped theldh:XHTML:MissingValueSPIN constraint; both handlers now run the pass first and canonicalize XMLLiterals in the request bodynavigation.xsl): thebodyonmousemovesidebar-reveal handler chains viaxsl:next-matchto the editor's sweep-selection tracker it shadowed by import precedencelayout.xsl): WYMEditor script/skin gone;rdfa-editor.cssloads under the same conditionsTest plan
[+ XHTML]block, edit (blocks, formatting, breadcrumb), save — literal round-trips without SPIN violations🤖 Generated with Claude Code