[{"data":1,"prerenderedAt":662},["ShallowReactive",2],{"quirekit-doc:\u002Fen\u002Fclassic\u002Fconfiguration":3},{"id":4,"title":5,"body":6,"description":651,"extension":652,"keywords":653,"locale":654,"meta":655,"navigation":656,"order":311,"path":657,"section":658,"seo":659,"stem":660,"__hash__":661},"docs\u002Fclassic\u002Fconfiguration.en.md","Configuration and lifetime",{"type":7,"value":8,"toc":643},"minimark",[9,24,29,117,128,132,250,253,337,350,361,365,419,430,434,445,470,482,579,602,606,621,625,639],[10,11,12,13,18,19,23],"p",{},"Run the complete ",[14,15,17],"a",{"href":16},"\u002Fen\u002Fclassic\u002Fquick-start","quick start"," before adapting its configuration. Vue applications use the ",[20,21,22],"code",{},"\u002Fvue"," entries to share the application's Vue runtime.",[25,26,28],"h2",{"id":27},"creation-time-choices","Creation-time choices",[30,31,32,45],"table",{},[33,34,35],"thead",{},[36,37,38,42],"tr",{},[39,40,41],"th",{},"Option",[39,43,44],{},"Purpose",[46,47,48,63,73,83,93,103],"tbody",{},[36,49,50,56],{},[51,52,53],"td",{},[20,54,55],{},"element",[51,57,58,59,62],{},"Editor host; omit it to call ",[20,60,61],{},"mount()"," later",[36,64,65,70],{},[51,66,67],{},[20,68,69],{},"document",[51,71,72],{},"Initial canonical content, rather than interface translations",[36,74,75,80],{},[51,76,77],{},[20,78,79],{},"preset",[51,81,82],{},"Document model, views and default product plugins",[36,84,85,90],{},[51,86,87],{},[20,88,89],{},"plugins",[51,91,92],{},"Product ribbons, sidebars, actions and file services",[36,94,95,100],{},[51,96,97],{},[20,98,99],{},"extensions",[51,101,102],{},"Additional Core extensions compatible with the model and View",[36,104,105,114],{},[51,106,107,110,111],{},[20,108,109],{},"media",", ",[20,112,113],{},"host",[51,115,116],{},"Durable media and host resource services, following their creation-time contracts",[10,118,119,120,122,123,127],{},"Do not recreate the instance on every interface render or repeatedly pass ",[20,121,69],{}," to update button state. See ",[14,124,126],{"href":125},"\u002Fen\u002Fbuild\u002Fmodel","document models"," for model and Schema choices.",[25,129,131],{"id":130},"interface-and-workspace","Interface and workspace",[30,133,134,146],{},[33,135,136],{},[36,137,138,140,143],{},[39,139,41],{},[39,141,142],{},"Usage",[39,144,145],{},"Defaults and boundaries",[46,147,148,167,180,193,211,224,237],{},[36,149,150,155,164],{},[51,151,152],{},[20,153,154],{},"locale",[51,156,157,160,161],{},[20,158,159],{},"'zh-CN'"," or ",[20,162,163],{},"'en'",[51,165,166],{},"Chinese by default; changes the interface without translating existing content",[36,168,169,174,177],{},[51,170,171],{},[20,172,173],{},"editable",[51,175,176],{},"false for read-only input",[51,178,179],{},"True by default; programmatic writes still need application permission checks",[36,181,182,187,190],{},[51,183,184],{},[20,185,186],{},"theme",[51,188,189],{},"A complete QuireKit theme",[51,191,192],{},"Instance overrides preset; not just a primary color",[36,194,195,200,208],{},[51,196,197],{},[20,198,199],{},"view",[51,201,202,160,205],{},[20,203,204],{},"{ backend: 'canvas' }",[20,206,207],{},"'svg'",[51,209,210],{},"Canvas by default; product backend updates rebuild Core",[36,212,213,218,221],{},[51,214,215],{},[20,216,217],{},"shell",[51,219,220],{},"Menu, ribbon, toolbar, ruler, sidebars and status visibility",[51,222,223],{},"Override individual preset fields",[36,225,226,231,234],{},[51,227,228],{},[20,229,230],{},"ui",[51,232,233],{},"Contribution ID lists or false for toolbar, contextMenu and selectionPopup",[51,235,236],{},"Compose installed controls rather than creating document commands",[36,238,239,244,247],{},[51,240,241],{},[20,242,243],{},"webFonts",[51,245,246],{},"Font-library settings or false",[51,248,249],{},"Omission enables default external font-library configuration; disabled hosts still prepare fonts used by content",[10,251,252],{},"For example, retain the ribbon, hide the compact toolbar and collapse controls in narrow windows:",[254,255,261],"pre",{"className":256,"code":257,"filename":258,"language":259,"meta":260,"style":260},"language-ts shiki shiki-themes github-light github-light github-dark","shell: { toolbar: false, ribbon: true, ribbonOverflow: 'collapse' },\nui: { selectionPopup: false },\nwebFonts: false,\n","Interface options at creation","ts","",[20,262,263,309,325],{"__ignoreMap":260},[264,265,268,271,275,278,281,285,287,290,292,295,297,300,302,306],"span",{"class":266,"line":267},"line",1,[264,269,217],{"class":270},"sgQzM",[264,272,274],{"class":273},"sVPnS",": { ",[264,276,277],{"class":270},"toolbar",[264,279,280],{"class":273},": ",[264,282,284],{"class":283},"sUNQB","false",[264,286,110],{"class":273},[264,288,289],{"class":270},"ribbon",[264,291,280],{"class":273},[264,293,294],{"class":283},"true",[264,296,110],{"class":273},[264,298,299],{"class":270},"ribbonOverflow",[264,301,280],{"class":273},[264,303,305],{"class":304},"s-HEn","'collapse'",[264,307,308],{"class":273}," },\n",[264,310,312,314,316,319,321,323],{"class":266,"line":311},2,[264,313,230],{"class":270},[264,315,274],{"class":273},[264,317,318],{"class":270},"selectionPopup",[264,320,280],{"class":273},[264,322,284],{"class":283},[264,324,308],{"class":273},[264,326,328,330,332,334],{"class":266,"line":327},3,[264,329,243],{"class":270},[264,331,280],{"class":273},[264,333,284],{"class":283},[264,335,336],{"class":273},",\n",[10,338,339,341,342,344,345,349],{},[20,340,217],{}," controls regions; ",[20,343,230],{}," composes registered items. Install new actions or panels through a ",[14,346,348],{"href":347},"\u002Fen\u002Fclassic\u002Fplugins","product plugin",", then reference contribution IDs. Visibility does not grant or revoke write permissions.",[10,351,352,353,356,357,360],{},"Load both ",[20,354,355],{},"@quirekit\u002Fclassic-editor\u002Fstyles.css"," and the selected Word package's ",[20,358,359],{},"@quirekit\u002Fclassic-docx\u002Fstyles.css",". The host supplies a real height and available width; public styles position product components, painted surfaces and overlays.",[25,362,364],{"id":363},"adjust-the-current-workspace-through-ui-controls","Adjust the current workspace through UI controls",[254,366,369],{"className":256,"code":367,"filename":368,"language":259,"meta":260,"style":260},"instance.ui.setZoomMode('fit-width')\ninstance.ui.setRulerVisible(false)\ninstance.ui.setSidebarVisible('right', false)\n","Interface changes without rebuilding Core",[20,370,371,388,401],{"__ignoreMap":260},[264,372,373,376,379,382,385],{"class":266,"line":267},[264,374,375],{"class":273},"instance.ui.",[264,377,378],{"class":270},"setZoomMode",[264,380,381],{"class":273},"(",[264,383,384],{"class":304},"'fit-width'",[264,386,387],{"class":273},")\n",[264,389,390,392,395,397,399],{"class":266,"line":311},[264,391,375],{"class":273},[264,393,394],{"class":270},"setRulerVisible",[264,396,381],{"class":273},[264,398,284],{"class":283},[264,400,387],{"class":273},[264,402,403,405,408,410,413,415,417],{"class":266,"line":327},[264,404,375],{"class":273},[264,406,407],{"class":270},"setSidebarVisible",[264,409,381],{"class":273},[264,411,412],{"class":304},"'right'",[264,414,110],{"class":273},[264,416,284],{"class":283},[264,418,387],{"class":273},[10,420,421,422,425,426,429],{},"These operations preserve content and history. Open an installed panel with ",[20,423,424],{},"openSidebarPanel(side, panelId)",". ",[20,427,428],{},"subscribe(listener)"," observes UI state and returns a cleanup function.",[25,431,433],{"id":432},"which-updates-rebuild-core","Which updates rebuild Core",[10,435,436,437,110,439,441,442,444],{},"Updates containing only ",[20,438,154],{},[20,440,173],{},", and supported ",[20,443,186],{}," changes retain the same Core, selection, storage, listeners and history. Both built-in generic and Word presets support theme updates. Locale does not translate content; theme refreshes UI and derived paint. Editability updates cancel imports that have not committed.",[10,446,447,448,110,450,110,452,110,454,110,456,110,458,110,461,110,463,465,466,469],{},"Supplying ",[20,449,69],{},[20,451,79],{},[20,453,89],{},[20,455,99],{},[20,457,199],{},[20,459,460],{},"features",[20,462,217],{},[20,464,230],{}," or runtime structure still unmounts and rebuilds Core\u002FView. Content is retained by default, but the old Core and history end; read ",[20,467,468],{},"instance.editor"," again. Mixed updates also follow this structural path. Update only when configuration changes, never per keystroke or Vue render.",[10,471,472,473,476,477,481],{},"A custom preset retains the session on theme changes only when it implements ",[20,474,475],{},"updatePresentation(context)",", refreshing owned nonpersistent presentation without changing Schema or content. Without the hook, theme changes still rebuild. See ",[14,478,480],{"href":479},"\u002Fen\u002Fclassic\u002Fapi","Classic API",".",[30,483,484,494],{},[33,485,486],{},[36,487,488,491],{},[39,489,490],{},"Updated field",[39,492,493],{},"Merge rule",[46,495,496,505,516,535,548,565],{},[36,497,498,502],{},[51,499,500],{},[20,501,69],{},[51,503,504],{},"Replace when explicitly supplied; otherwise retain current content",[36,506,507,513],{},[51,508,509,110,511],{},[20,510,89],{},[20,512,99],{},[51,514,515],{},"Replace instance arrays; include retained entries again. Preset plugins remain separate",[36,517,518,532],{},[51,519,520,110,522,110,524,110,526,110,529],{},[20,521,460],{},[20,523,217],{},[20,525,199],{},[20,527,528],{},"canvasRuntime",[20,530,531],{},"svgRuntime",[51,533,534],{},"Shallow merge individual fields into current settings",[36,536,537,541],{},[51,538,539],{},[20,540,230],{},[51,542,543,544,547],{},"Update by surface; each ",[20,545,546],{},"items"," list is final, and false disables that surface",[36,549,550,562],{},[51,551,552,110,554,110,556,110,558,110,560],{},[20,553,79],{},[20,555,186],{},[20,557,154],{},[20,559,173],{},[20,561,243],{},[51,563,564],{},"Use the supplied replacement value",[36,566,567,576],{},[51,568,569,110,571,110,573],{},[20,570,109],{},[20,572,113],{},[20,574,575],{},"surfaceMode",[51,577,578],{},"Not update options; create a new product to replace these services",[10,580,581,582,585,586,589,590,594,595,598,599,481],{},"Bind document subscriptions through plugin ",[20,583,584],{},"onMount"," \u002F ",[20,587,588],{},"onUnmount",", rather than observing only the first Core. The ",[14,591,593],{"href":592},"\u002Fen\u002Fclassic\u002Ffiles","saving tutorial"," includes a reusable recipe. Product ",[20,596,597],{},"onUpdate"," also runs for selection and interface changes; it differs from Core's content ",[20,600,601],{},"update",[25,603,605],{"id":604},"exit-and-remount","Exit and remount",[10,607,608,609,612,613,616,617,620],{},"After a dynamic import completes, check that its host still exists. ",[20,610,611],{},"unmount()"," releases the shell and Core while retaining content for ",[20,614,615],{},"mount(element)","; it loses that Core's history too. ",[20,618,619],{},"destroy()"," permanently releases product resources. Pending built-in import preparation becomes invalid on unmount, destruction or document changes. Task owners still cancel arbitrary custom network requests.",[25,622,624],{"id":623},"saving-and-resources","Saving and resources",[10,626,627,628,631,632,636,637,481],{},"A JSON download is an explicit snapshot rather than automatic saving. The application persists canonical content and media, handles failures and tracks unsaved changes; see ",[14,629,630],{"href":592},"Classic saving and opening",". Full options, instance methods and UI controls are in the ",[14,633,635],{"href":634},"\u002Fen\u002Fclassic\u002Freference","instance reference","; actions, panels and services are in ",[14,638,480],{"href":479},[640,641,642],"style",{},"html pre.shiki code .sgQzM, html code.shiki .sgQzM{--shiki-default:#6F42C1;--shiki-light:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVPnS, html code.shiki .sVPnS{--shiki-default:#24292E;--shiki-light:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sUNQB, html code.shiki .sUNQB{--shiki-default:#005CC5;--shiki-light:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s-HEn, html code.shiki .s-HEn{--shiki-default:#032F62;--shiki-light:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":260,"searchDepth":311,"depth":311,"links":644},[645,646,647,648,649,650],{"id":27,"depth":311,"text":28},{"id":130,"depth":311,"text":131},{"id":363,"depth":311,"text":364},{"id":432,"depth":311,"text":433},{"id":604,"depth":311,"text":605},{"id":623,"depth":311,"text":624},"Separate initial content, product settings and host services, then update and dispose the editor correctly.","md",null,"en",{},true,"\u002Fen\u002Fclassic\u002Fconfiguration","Classic basics",{"title":5,"description":651},"classic\u002Fconfiguration.en","MkpAoyLgv7qxqLWEDBcpSuDlo4r9mowxcISmfhmlGXY",1793045225184]