[{"data":1,"prerenderedAt":231},["ShallowReactive",2],{"msfe-doc:\u002Fen\u002Fcustomization\u002Ftoolbars":3},{"id":4,"title":5,"body":6,"description":213,"extension":214,"keywords":215,"locale":222,"meta":223,"navigation":224,"order":225,"path":226,"section":227,"seo":228,"stem":229,"__hash__":230},"docs\u002Fcustomization\u002Ftoolbars.en.md","Toolbars and dialogs",{"type":7,"value":8,"toc":204},"minimark",[9,14,34,130,136,140,153,156,160,163,178,182,185,197,201],[10,11,13],"h2",{"id":12},"toolbars-belong-to-the-host","Toolbars belong to the host",[15,16,17,18,22,23,22,26,29,30,33],"p",{},"MSFE does not mandate a toolbar. QuireKit Vue applications use public ",[19,20,21],"code",{},"QuireButton",", ",[19,24,25],{},"QuireIconButton",[19,27,28],{},"QuireSelect"," and ",[19,31,32],{},"QuirePopover"," components. Other hosts can use their own library while sharing MSFE's editing contracts.",[35,36,37,53],"table",{},[38,39,40],"thead",{},[41,42,43,47,50],"tr",{},[44,45,46],"th",{},"UI",[44,48,49],{},"Read",[44,51,52],{},"Execute",[54,55,56,75,90,106,119],"tbody",{},[41,57,58,62,70],{},[59,60,61],"td",{},"Bold",[59,63,64,22,67],{},[19,65,66],{},"isActive('bold')",[19,68,69],{},"can().toggleBold()",[59,71,72],{},[19,73,74],{},"commands.toggleBold()",[41,76,77,80,85],{},[59,78,79],{},"Heading level",[59,81,82],{},[19,83,84],{},"getAttributes('heading')",[59,86,87],{},[19,88,89],{},"commands.setHeading(level)",[41,91,92,95,101],{},[59,93,94],{},"Code language",[59,96,97,98],{},"NodeView ",[19,99,100],{},"attrs.language",[59,102,103],{},[19,104,105],{},"nodeView.updateAttributes({ language })",[41,107,108,111,114],{},[59,109,110],{},"Insert image",[59,112,113],{},"Dialog-local form state",[59,115,116],{},[19,117,118],{},"commands.insertImage({ url, alt, title })",[41,120,121,124,127],{},[59,122,123],{},"Business status",[59,125,126],{},"Installed semantic query",[59,128,129],{},"Named command or precise attribute patch",[15,131,132,135],{},[19,133,134],{},"getAttributes()"," returns null for absent, mixed or unconfirmed syntax. Do not display a fabricated default that overwrites mixed selections.",[10,137,139],{"id":138},"availability-and-subscriptions","Availability and subscriptions",[15,141,142,143,148,149,152],{},"Use ",[144,145,147],"a",{"href":146},"\u002Fen\u002Fguide\u002Fstate","state subscriptions"," to refresh values related to the current selection. ",[19,150,151],{},"can()"," must remain pure. Active state must come from semantics rather than inspecting bold DOM styles. Unsubscribe when controls unmount.",[15,154,155],{},"Use finite-value selectors for language names. Give icon buttons accessible names, expose toggle state and support keyboard use without hover.",[10,157,159],{"id":158},"preserve-the-intended-selection","Preserve the intended selection",[15,161,162],{},"Simple controls may preserve focus according to host event policy, execute a command and refocus the editor. Dialogs and menus require captured intent. Do not blanket-prevent pointerdown on every control, which can break keyboard, touch and input behavior.",[15,164,142,165,168,169,172,173,177],{},[19,166,167],{},"captureTarget()"," for a short menu and ",[19,170,171],{},"captureAnchor()"," plus a document scope for asynchronous dialogs. Do not replace the user's original selection with whatever selection happens to exist after the dialog opens. See ",[144,174,176],{"href":175},"\u002Fen\u002Fguide\u002Fselection","Selection and captured intent",".",[10,179,181],{"id":180},"permission-and-feedback","Permission and feedback",[15,183,184],{},"Writing controls account for readonly, locked mode, composition, installation and applicability. The final command result remains authoritative. Give suitable feedback for readonly, stale and inapplicable actions without exposing raw internal errors.",[15,186,187,188,29,192,196],{},"Reading, copying and folding need not all be disabled. ",[144,189,191],{"href":190},"\u002Fen\u002Fextensions\u002Fcontainers","Container controls",[144,193,195],{"href":194},"\u002Fen\u002Fextensions\u002Fcode-blocks","code-block toolbars"," demonstrate distinct contracts.",[10,198,200],{"id":199},"complex-application-boundaries","Complex application boundaries",[15,202,203],{},"Menus issue commands, extensions define behavior, codecs own exact source edits, and the component library owns presentation. Share a named command across keyboard, context-menu and toolbar entries instead of duplicating implementation. Use a chain for one compound operation.",{"title":205,"searchDepth":206,"depth":206,"links":207},"",2,[208,209,210,211,212],{"id":12,"depth":206,"text":13},{"id":138,"depth":206,"text":139},{"id":158,"depth":206,"text":159},{"id":180,"depth":206,"text":181},{"id":199,"depth":206,"text":200},"Build design-system controls with command availability, selection and asynchronous forms.","md",[216,217,218,219,220,221],"toolbar","menu","dialog","can","isActive","getAttributes","en",{},true,1,"\u002Fen\u002Fcustomization\u002Ftoolbars","UI and themes",{"title":5,"description":213},"customization\u002Ftoolbars.en","sz2_Svbt1UOvvCBI1aG1K9ir52aN6ng8InvDnZLoh0E",1793046312728]