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 @@ -74,8 +74,8 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx'
7474 const editor = superdoc ?.activeEditor || superdoc ?.editor
7575 if (! editor ?.commands ) return
7676 const tags = editor .helpers .structuredContentCommands .getStructuredContentTags (editor .state )
77- const field = tags .find (t => String (t .id ) === ' 1' )
78- const locked = field ?.lockMode && field .lockMode !== ' unlocked'
77+ const field = tags .find (t => String (t .node . attrs . id ) === ' 1' )
78+ const locked = field ?.node . attrs . lockMode && field . node . attrs .lockMode !== ' unlocked'
7979 editor .commands .updateStructuredContentById (' 1' , {
8080 attrs: { lockMode: locked ? ' unlocked' : ' sdtContentLocked' },
8181 });
@@ -87,8 +87,8 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx'
8787 const editor = superdoc ?.activeEditor || superdoc ?.editor
8888 if (! editor ?.commands ) return
8989 const tags = editor .helpers .structuredContentCommands .getStructuredContentTags (editor .state )
90- const field = tags .find (t => String (t .id ) === ' 2' )
91- const locked = field ?.lockMode && field .lockMode !== ' unlocked'
90+ const field = tags .find (t => String (t .node . attrs . id ) === ' 2' )
91+ const locked = field ?.node . attrs . lockMode && field . node . attrs .lockMode !== ' unlocked'
9292 editor .commands .updateStructuredContentById (' 2' , {
9393 attrs: { lockMode: locked ? ' unlocked' : ' sdtContentLocked' },
9494 });
You can’t perform that action at this time.
0 commit comments