[{"data":1,"prerenderedAt":485},["ShallowReactive",2],{"quirekit-doc:\u002Fen\u002Fplugins\u002Freference\u002Fcode-block":3},{"id":4,"title":5,"body":6,"description":12,"extension":473,"keywords":474,"locale":477,"meta":478,"navigation":160,"order":479,"path":480,"section":481,"seo":482,"stem":483,"__hash__":484},"docs\u002Fplugins\u002Freference\u002Fcode-block.en.md","CodeBlock",{"type":7,"value":8,"toc":456},"minimark",[9,13,24,29,35,88,96,100,116,124,131,197,204,208,211,214,218,224,229,235,241,247,251,254,259,263,267,270,274,278,282,285,289,294,298,301,305,310,314,317,322,327,331,334,339,344,348,351,401,409,413,424,428,439,452],[10,11,12],"p",{},"Stores multiline code and a language attribute, with configurable exit and indentation behavior. It does not install a syntax highlighter.",[10,14,15,19,20],{},[16,17,18],"code",{},"@quirekit\u002Fextension-code-block"," · ",[21,22,23],"strong",{},"MIT",[25,26,28],"h2",{"id":27},"editor-compatibility","Editor compatibility",[10,30,31,32],{},"Layer：",[21,33,34],{},"Shared document capability",[36,37,38,54],"table",{},[39,40,41],"thead",{},[42,43,44,48,51],"tr",{},[45,46,47],"th",{},"Editor",[45,49,50],{},"Status",[45,52,53],{},"Assembly and boundaries",[55,56,57,74],"tbody",{},[42,58,59,63,66],{},[60,61,62],"td",{},"Classic",[60,64,65],{},"Supported",[60,67,68,73],{},[69,70,72],"a",{"href":71},"\u002Fen\u002Fplugins\u002Freference\u002Fclassic-editor-preset","classicEditorPreset"," — Use the product-neutral classicEditorPreset without duplicating installed capabilities. The Word preset replaces paragraphs, headings and container lists; do not stack generic structures onto that model.",[42,75,76,79,81],{},[60,77,78],{},"Block",[60,80,65],{},[60,82,83,87],{},[69,84,86],{"href":85},"\u002Fen\u002Fplugins\u002Freference\u002Fcreate-block-editor-preset","createBlockEditorPreset"," — The default createBlockEditor preset installs this capability. Configure the corresponding preset child; graphic editing uses the preset's workspace ports, while persistence and assets remain host-owned. Avoid duplicate extensions.",[10,89,90,91,95],{},"“Supported” means the product assembly above exists; interaction, host services and file formats retain their own conditions. See ",[69,92,94],{"href":93},"\u002Fen\u002Fplugins\u002Fcompatibility","status and integration rules",". Licensing is shown separately.",[25,97,99],{"id":98},"installation","Installation",[101,102,107],"pre",{"className":103,"code":104,"language":105,"meta":106,"style":106},"language-sh shiki shiki-themes github-light github-light github-dark","pnpm add @quirekit\u002Fextension-code-block@alpha\n","sh","",[16,108,109],{"__ignoreMap":106},[110,111,114],"span",{"class":112,"line":113},"line",1,[110,115,104],{},[10,117,118,119,123],{},"Install in Editor extensions. The host supplies a view, container and persistence; see ",[69,120,122],{"href":121},"\u002Fen\u002Fguide\u002Fquick-start","Quick start",".",[10,125,126,127,130],{},"Included in StarterKit. Configure its ",[16,128,129],{},"codeBlock"," child, or disable that child before installing a replacement.",[101,132,136],{"className":133,"code":134,"language":135,"meta":106,"style":106},"language-ts shiki shiki-themes github-light github-light github-dark","import { CodeBlock } from '@quirekit\u002Fextension-code-block'\n\nconst code = CodeBlock.configure({ enableTabIndentation: true, tabSize: 2 })\n","ts",[16,137,138,155,162],{"__ignoreMap":106},[110,139,140,144,148,151],{"class":112,"line":113},[110,141,143],{"class":142},"sDD9d","import",[110,145,147],{"class":146},"sVPnS"," { CodeBlock } ",[110,149,150],{"class":142},"from",[110,152,154],{"class":153},"s-HEn"," '@quirekit\u002Fextension-code-block'\n",[110,156,158],{"class":112,"line":157},2,[110,159,161],{"emptyLinePlaceholder":160},true,"\n",[110,163,165,168,172,175,178,182,185,188,191,194],{"class":112,"line":164},3,[110,166,167],{"class":142},"const",[110,169,171],{"class":170},"sUNQB"," code",[110,173,174],{"class":142}," =",[110,176,177],{"class":146}," CodeBlock.",[110,179,181],{"class":180},"sgQzM","configure",[110,183,184],{"class":146},"({ enableTabIndentation: ",[110,186,187],{"class":170},"true",[110,189,190],{"class":146},", tabSize: ",[110,192,193],{"class":170},"2",[110,195,196],{"class":146}," })\n",[10,198,199,200,123],{},"Use compatible versions available from your distribution source. This site uses the Alpha workspace. License labels come from package metadata; see ",[69,201,203],{"href":202},"\u002Fen\u002Fsupport","support and licensing",[25,205,207],{"id":206},"integration-by-editor","Integration by editor",[10,209,210],{},"These snippets use an existing host element named element. The host owns container sizing and persistence; call instance.destroy() on teardown. Avoid duplicating preset capabilities and supply required host ports before installation.",[212,213],"plugin-integration",{"name":5},[25,215,217],{"id":216},"configuration","Configuration",[10,219,220,221,123],{},"These are extension-level defaults. Presets can override them; they are distinct from current document attributes. See ",[69,222,216],{"href":223},"\u002Fen\u002Fplugins\u002Fconfiguration",[225,226,228],"h3",{"id":227},"languageclassprefix","languageClassPrefix",[10,230,231,232,234],{},"Prefix added to language classes on rendered ",[16,233,16],{}," elements.",[10,236,237,238],{},"Type：",[16,239,240],{},"string | null | undefined",[10,242,243,244],{},"Default：",[16,245,246],{},"\"language-\"",[225,248,250],{"id":249},"exitontripleenter","exitOnTripleEnter",[10,252,253],{},"Whether triple Enter exits the code block.",[10,255,237,256],{},[16,257,258],{},"false | null | true | undefined",[10,260,243,261],{},[16,262,187],{},[225,264,266],{"id":265},"exitonarrowdown","exitOnArrowDown",[10,268,269],{},"Whether ArrowDown exits the final code block.",[10,271,237,272],{},[16,273,258],{},[10,275,243,276],{},[16,277,187],{},[225,279,281],{"id":280},"defaultlanguage","defaultLanguage",[10,283,284],{},"Default code language stored on new code blocks.",[10,286,237,287],{},[16,288,240],{},[10,290,243,291],{},[16,292,293],{},"null",[225,295,297],{"id":296},"enabletabindentation","enableTabIndentation",[10,299,300],{},"Whether Tab and Shift-Tab indent code block text.",[10,302,237,303],{},[16,304,258],{},[10,306,243,307],{},[16,308,309],{},"false",[225,311,313],{"id":312},"tabsize","tabSize",[10,315,316],{},"Number of spaces inserted or removed for indentation.",[10,318,237,319],{},[16,320,321],{},"number | null | undefined",[10,323,243,324],{},[16,325,326],{},"4",[225,328,330],{"id":329},"htmlattributes","HTMLAttributes",[10,332,333],{},"HTML attributes added when the code block serializes to HTML.",[10,335,237,336],{},[16,337,338],{},"Record\u003Cstring, unknown>",[10,340,243,341],{},[16,342,343],{},"{}",[25,345,347],{"id":346},"commands-and-runtime","Commands and runtime",[10,349,350],{},"These commands are supplied directly by this extension. Availability depends on the installed schema, selection and protection policy; query editor.can() first.",[36,352,353,363],{},[39,354,355],{},[42,356,357,360],{},[45,358,359],{},"Command",[45,361,362],{},"Parameter signature",[55,364,365,377,389],{},[42,366,367,372],{},[60,368,369],{},[16,370,371],{},"setCodeBlock",[60,373,374],{},[16,375,376],{},"setCodeBlock(attributes?: CodeBlockAttributes | undefined)",[42,378,379,384],{},[60,380,381],{},[16,382,383],{},"toggleCodeBlock",[60,385,386],{},[16,387,388],{},"toggleCodeBlock(attributes?: CodeBlockAttributes | undefined)",[42,390,391,396],{},[60,392,393],{},[16,394,395],{},"insertCodeBlockFromClipboard",[60,397,398],{},[16,399,400],{},"insertCodeBlockFromClipboard(options: InsertCodeBlockFromClipboardOptions)",[10,402,403,404,408],{},"These are parameter signatures. See ",[69,405,407],{"href":406},"\u002Fen\u002Fbuild\u002Fcommands","commands and controls"," to connect UI while retaining one transaction\u002Fhistory authority.",[25,410,412],{"id":411},"other-public-exports","Other public exports",[414,415,416],"ul",{},[417,418,419,19,421],"li",{},[16,420,5],{},[16,422,423],{},"@quirekit\u002Fstarter-kit",[25,425,427],{"id":426},"next-steps","Next steps",[10,429,430,431,435,436,438],{},"Return to ",[69,432,434],{"href":433},"\u002Fen\u002Fplugins","all plugins",", or read ",[69,437,216],{"href":223}," to distinguish options, attributes and commands.",[10,440,441,442,446,447,451],{},"See ",[69,443,445],{"href":444},"\u002Fen\u002Fbuild\u002Fextension","extension development"," for custom capabilities and ",[69,448,450],{"href":449},"\u002Fen\u002Fbuild","Build a product"," for complete hosting.",[453,454,455],"style",{},"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);}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}",{"title":106,"searchDepth":157,"depth":157,"links":457},[458,459,460,461,470,471,472],{"id":27,"depth":157,"text":28},{"id":98,"depth":157,"text":99},{"id":206,"depth":157,"text":207},{"id":216,"depth":157,"text":217,"children":462},[463,464,465,466,467,468,469],{"id":227,"depth":164,"text":228},{"id":249,"depth":164,"text":250},{"id":265,"depth":164,"text":266},{"id":280,"depth":164,"text":281},{"id":296,"depth":164,"text":297},{"id":312,"depth":164,"text":313},{"id":329,"depth":164,"text":330},{"id":346,"depth":157,"text":347},{"id":411,"depth":157,"text":412},{"id":426,"depth":157,"text":427},"md",[5,18,475,476,228,250,266,281,297,313,330,371,383,395,5,5],"代码块","nodes","en",{"navigationTitle":5,"license":23},70,"\u002Fen\u002Fplugins\u002Freference\u002Fcode-block","Content nodes",{"title":5,"description":12},"plugins\u002Freference\u002Fcode-block.en","ZEbu_7Yvb0-YqqI-fV_XgIYNU-SbPfRDrExAZQi9V64",1793045226224]