[{"data":1,"prerenderedAt":543},["ShallowReactive",2],{"quirekit-doc:\u002Fen\u002Fplugins\u002Fconfiguration":3},{"id":4,"title":5,"body":6,"description":533,"extension":534,"keywords":535,"locale":536,"meta":537,"navigation":185,"order":164,"path":538,"section":539,"seo":540,"stem":541,"__hash__":542},"docs\u002Fplugins\u002Fconfiguration.en.md","Configure plugins",{"type":7,"value":8,"toc":525},"minimark",[9,22,27,36,141,144,148,151,233,236,243,323,331,335,396,402,439,461,465,468,472,476,483,491,496,500,503,521],[10,11,12,13,17,18,21],"p",{},"Suppose your product only allows level-one and level-two headings. Heading's ",[14,15,16],"code",{},"levels"," option determines which levels the editor accepts. Turning the current paragraph into a level-two heading uses the runtime ",[14,19,20],{},"toggleHeading"," command. These happen at different stages.",[23,24,26],"h2",{"id":25},"choose-the-installation-layer","Choose the installation layer",[10,28,29,30,35],{},"Check the Classic and Block statuses and required presets at the top of each reference. ",[31,32,34],"a",{"href":33},"\u002Fen\u002Fplugins\u002Fcompatibility","Choose an editor and integration"," explains those statuses independently of licensing.",[37,38,39,55],"table",{},[40,41,42],"thead",{},[43,44,45,49,52],"tr",{},[46,47,48],"th",{},"What you install",[46,50,51],{},"Where it belongs",[46,53,54],{},"Examples",[56,57,58,73,85,99,112,127],"tbody",{},[43,59,60,64,70],{},[61,62,63],"td",{},"Nodes, marks, behavior and View registration",[61,65,66,67],{},"Core ",[14,68,69],{},"extensions",[61,71,72],{},"Heading, Link, Search, canvasViewExtension",[43,74,75,78,82],{},[61,76,77],{},"A bundle of Core extensions",[61,79,66,80],{},[14,81,69],{},[61,83,84],{},"StarterKit, TextStyleKit",[43,86,87,90,96],{},[61,88,89],{},"Product menus, sidebars and file services",[61,91,92,93],{},"Classic ",[14,94,95],{},"plugins",[61,97,98],{},"createClassicWordDocxPlugin, createClassicEditorPdfPlugin",[43,100,101,104,109],{},[61,102,103],{},"A complete product assembly policy",[61,105,92,106],{},[14,107,108],{},"preset",[61,110,111],{},"createClassicWordPreset, createClassicWordProPreset",[43,113,114,117,124],{},[61,115,116],{},"Block content and graphic workspace options",[61,118,119,120,123],{},"The ",[14,121,122],{},"createBlockEditor"," preset options object",[61,125,126],{},"starterKit, flowchart, mindMap",[43,128,129,132,138],{},[61,130,131],{},"Additional Block capability arrays",[61,133,134,135,137],{},"Spread into ",[14,136,122],{}," extensions",[61,139,140],{},"createBlockTableExtensions, createBlockNumberingExtensions",[10,142,143],{},"An extension with Classic in its name may still be a Core Extension, such as ClassicWordTable. Follow each page's installation instructions rather than inferring the contract from its name.",[23,145,147],{"id":146},"configure-a-bundled-plugin","Configure a bundled plugin",[10,149,150],{},"StarterKit already includes Heading. Configure that child instead of adding another Heading.",[152,153,158],"pre",{"className":154,"code":155,"language":156,"meta":157,"style":157},"language-ts shiki shiki-themes github-light github-light github-dark","import { StarterKit } from '@quirekit\u002Fstarter-kit'\n\nconst extensions = [\n  StarterKit.configure({ heading: { levels: [1, 2] } }),\n]\n","ts","",[14,159,160,180,187,202,227],{"__ignoreMap":157},[161,162,165,169,173,176],"span",{"class":163,"line":164},"line",1,[161,166,168],{"class":167},"sDD9d","import",[161,170,172],{"class":171},"sVPnS"," { StarterKit } ",[161,174,175],{"class":167},"from",[161,177,179],{"class":178},"s-HEn"," '@quirekit\u002Fstarter-kit'\n",[161,181,183],{"class":163,"line":182},2,[161,184,186],{"emptyLinePlaceholder":185},true,"\n",[161,188,190,193,196,199],{"class":163,"line":189},3,[161,191,192],{"class":167},"const",[161,194,137],{"class":195},"sUNQB",[161,197,198],{"class":167}," =",[161,200,201],{"class":171}," [\n",[161,203,205,208,212,215,218,221,224],{"class":163,"line":204},4,[161,206,207],{"class":171},"  StarterKit.",[161,209,211],{"class":210},"sgQzM","configure",[161,213,214],{"class":171},"({ heading: { levels: [",[161,216,217],{"class":195},"1",[161,219,220],{"class":171},", ",[161,222,223],{"class":195},"2",[161,225,226],{"class":171},"] } }),\n",[161,228,230],{"class":163,"line":229},5,[161,231,232],{"class":171},"]\n",[10,234,235],{},"Pass this array to Editor extensions. Parsing, commands and shortcuts accept only those two levels. Your toolbar should offer the same levels.",[10,237,238,239,242],{},"To supply a replacement with the same name, disable the preset child first. Only use ",[14,240,241],{},"false"," when the option type allows it.",[152,244,246],{"className":154,"code":245,"language":156,"meta":157,"style":157},"import { StarterKit } from '@quirekit\u002Fstarter-kit'\nimport { Heading } from '@quirekit\u002Fextension-heading'\n\nconst extensions = [\n  StarterKit.configure({ heading: false }),\n  Heading.configure({ levels: [1, 2] }),\n]\n",[14,247,248,258,270,274,284,298,318],{"__ignoreMap":157},[161,249,250,252,254,256],{"class":163,"line":164},[161,251,168],{"class":167},[161,253,172],{"class":171},[161,255,175],{"class":167},[161,257,179],{"class":178},[161,259,260,262,265,267],{"class":163,"line":182},[161,261,168],{"class":167},[161,263,264],{"class":171}," { Heading } ",[161,266,175],{"class":167},[161,268,269],{"class":178}," '@quirekit\u002Fextension-heading'\n",[161,271,272],{"class":163,"line":189},[161,273,186],{"emptyLinePlaceholder":185},[161,275,276,278,280,282],{"class":163,"line":204},[161,277,192],{"class":167},[161,279,137],{"class":195},[161,281,198],{"class":167},[161,283,201],{"class":171},[161,285,286,288,290,293,295],{"class":163,"line":229},[161,287,207],{"class":171},[161,289,211],{"class":210},[161,291,292],{"class":171},"({ heading: ",[161,294,241],{"class":195},[161,296,297],{"class":171}," }),\n",[161,299,301,304,306,309,311,313,315],{"class":163,"line":300},6,[161,302,303],{"class":171},"  Heading.",[161,305,211],{"class":210},[161,307,308],{"class":171},"({ levels: [",[161,310,217],{"class":195},[161,312,220],{"class":171},[161,314,223],{"class":195},[161,316,317],{"class":171},"] }),\n",[161,319,321],{"class":163,"line":320},7,[161,322,232],{"class":171},[10,324,325,326,330],{},"Choose one approach. These are focused assembly changes; ",[31,327,329],{"href":328},"\u002Fen\u002Fguide\u002Fquick-start","Quick start"," explains the container and mounting lifecycle.",[23,332,334],{"id":333},"separate-options-from-content","Separate options from content",[37,336,337,350],{},[40,338,339],{},[43,340,341,344,347],{},[46,342,343],{},"Value",[46,345,346],{},"Lifetime",[46,348,349],{},"Example",[56,351,352,363,374,385],{},[43,353,354,357,360],{},[61,355,356],{},"Extension options",[61,358,359],{},"Extension creation\u002Fassembly",[61,361,362],{},"Heading levels",[43,364,365,368,371],{},[61,366,367],{},"Node and mark attributes",[61,369,370],{},"Canonical document, changed through commands",[61,372,373],{},"A heading's level, a link's href",[43,375,376,379,382],{},[61,377,378],{},"Storage",[61,380,381],{},"Editor-local runtime state\u002Freaders",[61,383,384],{},"characterCount.characters()",[43,386,387,390,393],{},[61,388,389],{},"Host services",[61,391,392],{},"Created and released by the application",[61,394,395],{},"Proofing provider, graphic workspace, transport",[10,397,398,401],{},[14,399,400],{},".configure()"," returns a configured extension copy. It does not reconfigure an already mounted editor in place. Changing an options object also does not rewrite existing heading content; use commands to change the document.",[152,403,405],{"className":154,"code":404,"language":156,"meta":157,"style":157},"editor.chain().focus().toggleHeading({ level: 2 }).run()\n",[14,406,407],{"__ignoreMap":157},[161,408,409,412,415,418,421,423,425,428,430,433,436],{"class":163,"line":164},[161,410,411],{"class":171},"editor.",[161,413,414],{"class":210},"chain",[161,416,417],{"class":171},"().",[161,419,420],{"class":210},"focus",[161,422,417],{"class":171},[161,424,20],{"class":210},[161,426,427],{"class":171},"({ level: ",[161,429,223],{"class":195},[161,431,432],{"class":171}," }).",[161,434,435],{"class":210},"run",[161,437,438],{"class":171},"()\n",[10,440,441,442,444,445,448,449,220,452,455,456,460],{},"A ",[14,443,241],{}," command result must not produce success feedback. For example, a Heading configured for levels one and two rejects ",[14,446,447],{},"level: 3",". Connect ",[14,450,451],{},"editor.can()",[14,453,454],{},"editor.isActive()"," and transaction subscriptions to your controls; see ",[31,457,459],{"href":458},"\u002Fen\u002Fbuild\u002Fcommands","commands and controls",".",[23,462,464],{"id":463},"try-the-configured-behavior","Try the configured behavior",[10,466,467],{},"This example accepts levels one and two. Apply level two, then try level three: the latter fails while preserving the document. Source files contain only this example's creation, controls and cleanup.",[469,470],"docs-demo",{"name":471},"plugins\u002Fconfiguration",[23,473,475],{"id":474},"read-defaults-in-context","Read defaults in context",[10,477,478,479,482],{},"Each reference documents that entry's own defaults. A preset may override them: Proofing directly defaults provider to ",[14,480,481],{},"null",", while the complete Word kit can choose a default proofing service. Read the assembly layer you actually use.",[10,484,485,488,489,460],{},[14,486,487],{},"undefined"," means no explicit option; children or host assembly may still choose a fallback. StarterKit enables children by default, accepts an options object to configure a child, and disables it with ",[14,490,241],{},[10,492,493,495],{},[14,494,481],{}," often means an absent service, such as a graphic open port or proofing provider. It does not trigger an automatic network service. Each reference explains the ports it requires.",[23,497,499],{"id":498},"complete-the-integration","Complete the integration",[10,501,502],{},"A document model does not automatically supply product UI or support every View and export format. Check the relevant View, required graphic\u002Fproofing\u002Fcollaboration services, and persistence\u002Fexport behavior.",[10,504,505,506,510,511,515,516,520],{},"Use ",[31,507,509],{"href":508},"\u002Fen\u002Fplugins","all plugins"," to find a capability. Follow ",[31,512,514],{"href":513},"\u002Fen\u002Fbuild","Build a product"," for complete assembly and ",[31,517,519],{"href":518},"\u002Fen\u002Fbuild\u002Fproduct-plugin","product plugin development"," for file-service integration.",[522,523,524],"style",{},"html pre.shiki code .sDD9d, html code.shiki .sDD9d{--shiki-default:#D73A49;--shiki-light:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVPnS, html code.shiki .sVPnS{--shiki-default:#24292E;--shiki-light:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s-HEn, html code.shiki .s-HEn{--shiki-default:#032F62;--shiki-light:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sUNQB, html code.shiki .sUNQB{--shiki-default:#005CC5;--shiki-light:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sgQzM, html code.shiki .sgQzM{--shiki-default:#6F42C1;--shiki-light:#6F42C1;--shiki-dark:#B392F0}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":157,"searchDepth":182,"depth":182,"links":526},[527,528,529,530,531,532],{"id":25,"depth":182,"text":26},{"id":146,"depth":182,"text":147},{"id":333,"depth":182,"text":334},{"id":463,"depth":182,"text":464},{"id":474,"depth":182,"text":475},{"id":498,"depth":182,"text":499},"Choose the installation layer and distinguish options, document attributes, commands and runtime state.","md",null,"en",{},"\u002Fen\u002Fplugins\u002Fconfiguration","Plugin overview",{"title":5,"description":533},"plugins\u002Fconfiguration.en","li1H4zU5qJ5Fy3rnvHJc0IszrfffuCzuZhG7W9ttWIY",1793045225652]