File tree Expand file tree Collapse file tree
apps/docs/snippets/extensions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,36 +67,6 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx'
6767 }
6868 },
6969 ],
70- [
71- {
72- label: ' Toggle inline lock' ,
73- onClick : (superdoc ) => {
74- const editor = superdoc ?.activeEditor || superdoc ?.editor
75- if (! editor ?.commands ) return
76- const tags = editor .helpers .structuredContentCommands .getStructuredContentTags (editor .state )
77- const field = tags .find (t => String (t .node .attrs .id ) === ' 1' )
78- if (! field ) return
79- const locked = field .node .attrs .lockMode && field .node .attrs .lockMode !== ' unlocked'
80- editor .commands .updateStructuredContentById (' 1' , {
81- attrs: { lockMode: locked ? ' unlocked' : ' sdtContentLocked' },
82- })
83- }
84- },
85- {
86- label: ' Toggle block lock' ,
87- onClick : (superdoc ) => {
88- const editor = superdoc ?.activeEditor || superdoc ?.editor
89- if (! editor ?.commands ) return
90- const tags = editor .helpers .structuredContentCommands .getStructuredContentTags (editor .state )
91- const field = tags .find (t => String (t .node .attrs .id ) === ' 2' )
92- if (! field ) return
93- const locked = field .node .attrs .lockMode && field .node .attrs .lockMode !== ' unlocked'
94- editor .commands .updateStructuredContentById (' 2' , {
95- attrs: { lockMode: locked ? ' unlocked' : ' sdtContentLocked' },
96- })
97- }
98- },
99- ],
10070 [
10171 {
10272 label: ' Delete all fields' ,
You can’t perform that action at this time.
0 commit comments