feat(nav): partial HTMX navigation — swap main content without full reload
Intercept internal links and load only .main-wrapper via htmx.ajax, keeping the sidebar/header shell in place. Adds history pushState/popstate handling, sidebar active-state resync and document title update. Moves page script blocks inside #main-content so they run on swap, and makes editor/board scripts idempotent. Routes navigateTo/breadcrumb/library/local-workspace through window.fdNavigate and fixes the duplicated navigateTo definition.
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
</script>
|
||||
<script data-cfasync="false">
|
||||
/* eslint-disable */
|
||||
if (!window.__fdEditorScriptsLoaded) {
|
||||
window.__fdEditorScriptsLoaded = true;
|
||||
const CMDS=[{name:'BASIC',items:[
|
||||
{id:'paragraph',name:'Text',icon:'¶'},{id:'heading_1',name:'Heading 1',icon:'H1'},{id:'heading_2',name:'Heading 2',icon:'H2'},
|
||||
{id:'heading_3',name:'Heading 3',icon:'H3'},{id:'heading_4',name:'Heading 4',icon:'H4'},{id:'bulleted_list',name:'Bulleted list',icon:'•'},{id:'numbered_list',name:'Numbered list',icon:'1.'},
|
||||
@@ -2120,4 +2122,6 @@ applyAIBlocks(text){
|
||||
default: return c;
|
||||
}
|
||||
}
|
||||
window.editorState = editorState;
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user