[{"data":1,"prerenderedAt":141},["ShallowReactive",2],{"text-diagram-doc:\u002Fen\u002Fguide\u002Fdialog":3},{"id":4,"title":5,"body":6,"description":129,"extension":130,"keywords":131,"locale":132,"meta":133,"navigation":134,"order":135,"path":136,"section":137,"seo":138,"stem":139,"__hash__":140},"docs\u002Fguide\u002Fdialog.en.md","Open a dialog",{"type":7,"value":8,"toc":123},"minimark",[9,24,28,31,36,59,74,88,92,106],[10,11,12,13,17,18,23],"p",{},"Use ",[14,15,16],"code",{},"openTextDiagramDialog"," for a button → edit diagram → return to page workflow. It creates an independent Vue root, lazily loads the workbench and provides its own providers. The host still installs the ",[19,20,22],"a",{"href":21},"\u002Fen\u002Fguide\u002Fvue","workbench styles",".",[25,26],"docs-demo",{"name":27},"dialog\u002Flauncher",[10,29,30],{},"The example starts with a PlantUML sequence diagram. Saving displays a PNG; reopening reads the newly accepted revision. Cancelling leaves the object unchanged. This example's in-memory session ends when you leave the page.",[32,33,35],"h2",{"id":34},"theme-and-lifetime","Theme and lifetime",[10,37,38,39,42,43,46,47,50,51,54,55,58],{},"Pass the actual ",[14,40,41],{},"ownerDocument",", ",[14,44,45],{},"locale"," and host ",[14,48,49],{},"theme",". Theme is not persisted in the document: previews retain the engine's or source-defined appearance. The example derives a theme from the page's CSS ",[14,52,53],{},"color-scheme","; an application can pass its own ",[14,56,57],{},"QuireKitTheme"," directly.",[10,60,61,62,65,66,69,70,73],{},"The returned ",[14,63,64],{},"TextDiagramDialogHandle"," is usable immediately. Call ",[14,67,68],{},"close()"," even before lazy loading completes; repeated calls are safe. Pass ",[14,71,72],{},"signal"," to close everything when the host unmounts.",[10,75,76,77,80,81,84,85,23],{},"The dialog calls ",[14,78,79],{},"request.release()"," after a successful save, cancellation, external close or loading failure. Release is not a save notification: it also runs on cancellation. A save is accepted only when ",[14,82,83],{},"commit"," returns ",[14,86,87],{},"saved",[32,89,91],{"id":90},"focus-and-commit","Focus and commit",[10,93,94,95,42,98,101,102,105],{},"In the source pane, Esc first handles search or the editor's focus escape. Press Esc then Tab to leave the source pane. Closing restores focus to the trigger. If commit returns ",[14,96,97],{},"conflict",[14,99,100],{},"readonly"," or ",[14,103,104],{},"missing",", the workbench explains the outcome and retains the draft.",[10,107,108,110,111,113,114,118,119,23],{},[14,109,83],{}," is synchronous local acceptance, not a Promise. Applications with server persistence must define a local transaction and synchronization strategy first. Do not return ",[14,112,87],{}," before accepting the object. See ",[19,115,117],{"href":116},"\u002Fen\u002Fguide\u002Fpersistence","persistence"," and the ",[19,120,122],{"href":121},"\u002Fen\u002Fapi\u002Feditor","dialog API",{"title":124,"searchDepth":125,"depth":125,"links":126},"",2,[127,128],{"id":34,"depth":125,"text":35},{"id":90,"depth":125,"text":91},"Open the workbench from a browser host, pass its theme and release the request on close.","md",null,"en",{},true,3,"\u002Fen\u002Fguide\u002Fdialog","Integration",{"title":5,"description":129},"guide\u002Fdialog.en","HKUhB_ZMKVAAm-DYXDsX2r_CBzK2r1AleKH7Fu0ZxS4",1793045389220]