[{"data":1,"prerenderedAt":1201},["ShallowReactive",2],{"quirekit-doc:\u002Fbuild\u002Fextension":3,"quirekit-source:product\u002Ffeature\u002Fextension.ts":520,"mdc--jbh9g8-key":521},{"id":4,"title":5,"body":6,"description":509,"extension":510,"keywords":511,"locale":512,"meta":513,"navigation":514,"order":111,"path":515,"section":516,"seo":517,"stem":518,"__hash__":519},"docs\u002Fbuild\u002Fextension.zh-CN.md","添加自己的内容类型",{"type":7,"value":8,"toc":500},"minimark",[9,13,21,26,37,126,144,151,155,166,265,280,319,326,330,337,347,356,360,363,373,376,382,386,389,460,471,475,478,488,496],[10,11,12],"p",{},"假设你在做知识库，需要一种“提示组”：里面可以有多个段落，用户能输入、选中、复制，并把它和正文一起保存。这已经超出了给段落换个颜色的范围——提示组是文档中一种有名称、有子内容的新结构。",[10,14,15,16,20],{},"本章把这种结构命名为 ",[17,18,19],"code",{},"docsNote","。先理解内容和命令，再看 Canvas\u002FSVG 额外需要的显示与选区配置。",[22,23,25],"h2",{"id":24},"_1-定义它保存什么","1. 定义它保存什么",[10,27,28,29,32,33,36],{},"在 ",[17,30,31],{},"feature\u002Fnode.ts"," 中通过 ",[17,34,35],{},"Node.create()"," 定义提示组。下面是决定文档结构的部分：",[38,39,45],"pre",{"className":40,"code":41,"filename":42,"language":43,"meta":44,"style":44},"language-ts shiki shiki-themes github-light github-light github-dark","const DocsNote = Node.create({\n  name: 'docsNote',\n  group: 'block',\n  content: 'block+',\n  isolating: true,\n})\n","feature\u002Fnode.ts · 节点结构","ts","",[17,46,47,74,87,98,109,120],{"__ignoreMap":44},[48,49,52,56,60,63,67,71],"span",{"class":50,"line":51},"line",1,[48,53,55],{"class":54},"sDD9d","const",[48,57,59],{"class":58},"sUNQB"," DocsNote",[48,61,62],{"class":54}," =",[48,64,66],{"class":65},"sVPnS"," Node.",[48,68,70],{"class":69},"sgQzM","create",[48,72,73],{"class":65},"({\n",[48,75,77,80,84],{"class":50,"line":76},2,[48,78,79],{"class":65},"  name: ",[48,81,83],{"class":82},"s-HEn","'docsNote'",[48,85,86],{"class":65},",\n",[48,88,90,93,96],{"class":50,"line":89},3,[48,91,92],{"class":65},"  group: ",[48,94,95],{"class":82},"'block'",[48,97,86],{"class":65},[48,99,101,104,107],{"class":50,"line":100},4,[48,102,103],{"class":65},"  content: ",[48,105,106],{"class":82},"'block+'",[48,108,86],{"class":65},[48,110,112,115,118],{"class":50,"line":111},5,[48,113,114],{"class":65},"  isolating: ",[48,116,117],{"class":58},"true",[48,119,86],{"class":65},[48,121,123],{"class":50,"line":122},6,[48,124,125],{"class":65},"})\n",[10,127,128,131,132,135,136,139,140,143],{},[17,129,130],{},"name"," 是保存到 JSON 中的节点名。",[17,133,134],{},"group: 'block'"," 让它像段落一样出现在正文中。",[17,137,138],{},"content: 'block+'"," 表示里面至少有一个块级节点，例如段落；",[17,141,142],{},"isolating"," 则让通用编辑操作尊重这个容器的边界。",[10,145,146,147,150],{},"完整文件还定义了 HTML 的读取与输出规则：提示组对应 ",[17,148,149],{},"aside[data-docs-note]","，子内容放在其中。这样复制为 HTML 时保留它的结构。以上片段只解释结构字段，完整定义在本页末尾按文件查阅。",[22,152,154],{"id":153},"_2-提供一个插入命令","2. 提供一个插入命令",[10,156,157,158,161,162,165],{},"界面应当调用“插入提示组”，不需要知道它内部如何拼接 JSON。在 ",[17,159,160],{},"feature\u002Fextension.ts"," 中提供 ",[17,163,164],{},"insertDocsNote(text)","，命令的关键部分是：",[38,167,170],{"className":40,"code":168,"filename":169,"language":43,"meta":44,"style":44},"insertDocsNote: (text: string) => ({ commands }) =>\n  commands.insertContent({\n    type: 'docsNote',\n    content: [{\n      type: 'paragraph',\n      content: [{ type: 'text', text }],\n    }],\n  })\n","feature\u002Fextension.ts · 插入内容",[17,171,172,208,218,227,232,242,253,259],{"__ignoreMap":44},[48,173,174,177,180,184,187,190,193,196,199,202,205],{"class":50,"line":51},[48,175,176],{"class":69},"insertDocsNote",[48,178,179],{"class":65},": (",[48,181,183],{"class":182},"sde8i","text",[48,185,186],{"class":54},":",[48,188,189],{"class":58}," string",[48,191,192],{"class":65},") ",[48,194,195],{"class":54},"=>",[48,197,198],{"class":65}," ({ ",[48,200,201],{"class":182},"commands",[48,203,204],{"class":65}," }) ",[48,206,207],{"class":54},"=>\n",[48,209,210,213,216],{"class":50,"line":76},[48,211,212],{"class":65},"  commands.",[48,214,215],{"class":69},"insertContent",[48,217,73],{"class":65},[48,219,220,223,225],{"class":50,"line":89},[48,221,222],{"class":65},"    type: ",[48,224,83],{"class":82},[48,226,86],{"class":65},[48,228,229],{"class":50,"line":100},[48,230,231],{"class":65},"    content: [{\n",[48,233,234,237,240],{"class":50,"line":111},[48,235,236],{"class":65},"      type: ",[48,238,239],{"class":82},"'paragraph'",[48,241,86],{"class":65},[48,243,244,247,250],{"class":50,"line":122},[48,245,246],{"class":65},"      content: [{ type: ",[48,248,249],{"class":82},"'text'",[48,251,252],{"class":65},", text }],\n",[48,254,256],{"class":50,"line":255},7,[48,257,258],{"class":65},"    }],\n",[48,260,262],{"class":50,"line":261},8,[48,263,264],{"class":65},"  })\n",[10,266,267,268,271,272,275,276,279],{},"它复用 ",[17,269,270],{},"insertContent()","，所以仍经过 Core 的事务与撤销历史。完整文件为命令补充 TypeScript 声明，并通过 ",[17,273,274],{},"addExtensions()"," 安装节点。安装 ",[17,277,278],{},"DocsNoteFeature"," 后，按钮可以这样调用：",[38,281,284],{"className":40,"code":282,"filename":283,"language":43,"meta":44,"style":44},"editor.chain().focus().insertDocsNote('这里是提示内容').run()\n","在按钮中调用",[17,285,286],{"__ignoreMap":44},[48,287,288,291,294,297,300,302,304,307,310,313,316],{"class":50,"line":51},[48,289,290],{"class":65},"editor.",[48,292,293],{"class":69},"chain",[48,295,296],{"class":65},"().",[48,298,299],{"class":69},"focus",[48,301,296],{"class":65},[48,303,176],{"class":69},[48,305,306],{"class":65},"(",[48,308,309],{"class":82},"'这里是提示内容'",[48,311,312],{"class":65},").",[48,314,315],{"class":69},"run",[48,317,318],{"class":65},"()\n",[10,320,321,322,325],{},"现在，“新增节点”和“通过界面插入它”已经连起来了。",[17,323,324],{},"can().insertDocsNote(...)"," 也可以用来检查按钮是否可用。",[22,327,329],{"id":328},"_3-告诉-canvassvg-怎样排列子内容","3. 告诉 Canvas\u002FSVG 怎样排列子内容",[10,331,332,333,336],{},"DOM 可以根据 HTML 生成页面元素；Canvas\u002FSVG 使用 QuireKit 的排版结果，所以仅有 ",[17,334,335],{},"renderHTML()"," 还不够。提示组还需要一个布局提供者（layout provider）。",[10,338,339,342,343,346],{},[17,340,341],{},"feature\u002Flayout.ts"," 使用引擎已有的子块排版服务：先在可用宽度内排列子段落，再把这些段落放进提示组的区域。它不自己测量浏览器 DOM，也不重新实现文字排版。",[17,344,345],{},"addLayoutProviders()"," 把这项能力交给编辑器。",[10,348,349,350,355],{},"这一步使提示组在 Canvas 和 SVG 中都能显示。布局接口涉及尺寸、文档范围和分页，完整参数在 ",[351,352,354],"a",{"href":353},"\u002Fapi\u002Fextensions","扩展 API","中查阅；第一次接入可以先沿用此例的普通容器布局。",[22,357,359],{"id":358},"_4-让选区理解容器边界","4. 让选区理解容器边界",[10,361,362],{},"用户在组内拖选时，应该像选择普通文字一样工作；从组外拖到组内时，编辑器还要知道哪些子节点属于这次选择。",[10,364,365,368,369,372],{},[17,366,367],{},"feature\u002Fselection.ts"," 定义这两种行为：组内交给文字选区，跨越边界时按子节点处理。",[17,370,371],{},"addSelectionAdapters()"," 注册它。显示与选择分开定义，才能让复制、替换和跨容器选择使用相同的内容范围。",[22,374,375],{"id":375},"试用并检查结果",[10,377,378,379,381],{},"点击“插入提示组”，在里面输入文字，拖选组内和组外的内容，再撤销。切到 SVG 后内容应继续存在；下载 JSON 可以看到 ",[17,380,19],{}," 和它包含的段落。",[383,384],"docs-demo",{"name":385},"product\u002Fgeneric",[22,387,388],{"id":388},"按职责查阅完整文件",[390,391,392,408],"table",{},[393,394,395],"thead",{},[396,397,398,402,405],"tr",{},[399,400,401],"th",{},"文件",[399,403,404],{},"什么时候看",[399,406,407],{},"它负责什么",[409,410,411,424,436,448],"tbody",{},[396,412,413,418,421],{},[414,415,416],"td",{},[17,417,31],{},[414,419,420],{},"要增加字段或修改允许的子内容",[414,422,423],{},"节点结构、HTML 读取与输出",[396,425,426,430,433],{},[414,427,428],{},[17,429,160],{},[414,431,432],{},"要安装功能或调整插入动作",[414,434,435],{},"命令类型、命令实现、能力注册",[396,437,438,442,445],{},[414,439,440],{},[17,441,341],{},[414,443,444],{},"要改变容器的排列方式",[414,446,447],{},"Canvas\u002FSVG 中子内容的尺寸和位置",[396,449,450,454,457],{},[414,451,452],{},[17,453,367],{},[414,455,456],{},"要改变跨容器选择行为",[414,458,459],{},"容器内部与边界的选区规则",[10,461,462,463,466,467,470],{},"下面一次只显示你选择的文件。先读 ",[17,464,465],{},"node.ts"," 和 ",[17,468,469],{},"extension.ts","，需要调整排版时再读另外两个。",[472,473],"docs-recipe",{"name":474},"product\u002Ffeature\u002Fextension",[22,476,477],{"id":477},"保存与其他格式",[10,479,480,481,466,484,487],{},"提示组的 JSON 与正文一起保存，恢复时必须再次安装此扩展。本例没有实现 DOCX 转换或 AI 能力；需要这些功能时，要分别通过 ",[17,482,483],{},"addDocx()",[17,485,486],{},"addAiCapabilities()"," 补充规则。能保存 JSON 并不代表其他文件格式已经认识这种节点。",[10,489,490,491,495],{},"如果你的需求是增加工具栏或侧栏，而不是新的正文结构，继续阅读",[351,492,494],{"href":493},"\u002Fbuild\u002Fproduct-plugin","产品插件","。",[497,498,499],"style",{},"html pre.shiki code .sDD9d, html code.shiki .sDD9d{--shiki-default:#D73A49;--shiki-light:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sUNQB, html code.shiki .sUNQB{--shiki-default:#005CC5;--shiki-light:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVPnS, html code.shiki .sVPnS{--shiki-default:#24292E;--shiki-light:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sgQzM, html code.shiki .sgQzM{--shiki-default:#6F42C1;--shiki-light:#6F42C1;--shiki-dark:#B392F0}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);}html pre.shiki code .sde8i, html code.shiki .sde8i{--shiki-default:#E36209;--shiki-light:#E36209;--shiki-dark:#FFAB70}",{"title":44,"searchDepth":76,"depth":76,"links":501},[502,503,504,505,506,507,508],{"id":24,"depth":76,"text":25},{"id":153,"depth":76,"text":154},{"id":328,"depth":76,"text":329},{"id":358,"depth":76,"text":359},{"id":375,"depth":76,"text":375},{"id":388,"depth":76,"text":388},{"id":477,"depth":76,"text":477},"以提示组为例，逐步理解节点、插入命令、显示和选区。","md",null,"zh-CN",{},true,"\u002Fbuild\u002Fextension","构建产品",{"title":5,"description":509},"build\u002Fextension.zh-CN","Tp8ueZFlLkHDabchptQ6PvUDE21FzOCNkuAKsvj3RxU","import { Extension } from \"@quirekit\u002Fcore\";\nimport { DocsNote } from \".\u002Fnode\";\nimport { noteLayout } from \".\u002Flayout\";\nimport { noteSelection } from \".\u002Fselection\";\n\ndeclare module \"@quirekit\u002Fcore\" {\n  \u002F** The same typed command registry used by direct, chain and can modes. *\u002F\n  interface Commands\u003CReturnType> {\n    \u002F** Feature-owned commands. *\u002F\n    docsNote: {\n      \u002F** @param text - Paragraph text inside a new note. @returns Whether insertion can run or was handled. *\u002F\n      insertDocsNote: (text: string) => ReturnType;\n    };\n  }\n}\n\u002F** One installable feature owns schema, command, retained layout and structured selection. *\u002F\nexport const DocsNoteFeature = Extension.create({\n  name: \"docsNoteFeature\",\n  \u002F** @returns Schema owner; no second document is maintained. *\u002F\n  addExtensions() { return [DocsNote]; },\n  \u002F** @returns Typed raw command factories, also safe in can() dry runs. *\u002F\n  addCommands() {\n    return {\n      insertDocsNote: (text: string) => ({ commands }) => commands.insertContent({ type: \"docsNote\",\n        content: [{ type: \"paragraph\", content: [{ type: \"text\", text }] }] }),\n    };\n  },\n  \u002F** @returns Renderer-neutral geometry owner. *\u002F\n  addLayoutProviders() { return [noteLayout]; },\n  \u002F** @returns Structured crossing semantics, independently of hit testing. *\u002F\n  addSelectionAdapters() { return [noteSelection]; },\n});\n",{"data":522,"body":523},{},{"type":524,"children":525},"root",[526,1196],{"type":527,"tag":38,"props":528,"children":530},"element",{"className":40,"code":529,"language":43,"meta":44,"style":44},"import { Extension } from \"@quirekit\u002Fcore\";\nimport { DocsNote } from \".\u002Fnode\";\nimport { noteLayout } from \".\u002Flayout\";\nimport { noteSelection } from \".\u002Fselection\";\n\ndeclare module \"@quirekit\u002Fcore\" {\n  \u002F** The same typed command registry used by direct, chain and can modes. *\u002F\n  interface Commands\u003CReturnType> {\n    \u002F** Feature-owned commands. *\u002F\n    docsNote: {\n      \u002F** @param text - Paragraph text inside a new note. @returns Whether insertion can run or was handled. *\u002F\n      insertDocsNote: (text: string) => ReturnType;\n    };\n  }\n}\n\u002F** One installable feature owns schema, command, retained layout and structured selection. *\u002F\nexport const DocsNoteFeature = Extension.create({\n  name: \"docsNoteFeature\",\n  \u002F** @returns Schema owner; no second document is maintained. *\u002F\n  addExtensions() { return [DocsNote]; },\n  \u002F** @returns Typed raw command factories, also safe in can() dry runs. *\u002F\n  addCommands() {\n    return {\n      insertDocsNote: (text: string) => ({ commands }) => commands.insertContent({ type: \"docsNote\",\n        content: [{ type: \"paragraph\", content: [{ type: \"text\", text }] }] }),\n    };\n  },\n  \u002F** @returns Renderer-neutral geometry owner. *\u002F\n  addLayoutProviders() { return [noteLayout]; },\n  \u002F** @returns Structured crossing semantics, independently of hit testing. *\u002F\n  addSelectionAdapters() { return [noteSelection]; },\n});\n\n",[531],{"type":527,"tag":17,"props":532,"children":533},{"__ignoreMap":44},[534,565,590,615,640,648,670,679,708,717,735,769,817,826,835,844,853,889,906,924,948,965,979,992,1063,1092,1100,1109,1126,1148,1165,1187],{"type":527,"tag":48,"props":535,"children":536},{"class":50,"line":51},[537,543,549,554,560],{"type":527,"tag":48,"props":538,"children":540},{"style":539},"--shiki-default:#D73A49;--shiki-light:#D73A49;--shiki-dark:#F97583",[541],{"type":183,"value":542},"import",{"type":527,"tag":48,"props":544,"children":546},{"style":545},"--shiki-default:#24292E;--shiki-light:#24292E;--shiki-dark:#E1E4E8",[547],{"type":183,"value":548}," { Extension } ",{"type":527,"tag":48,"props":550,"children":551},{"style":539},[552],{"type":183,"value":553},"from",{"type":527,"tag":48,"props":555,"children":557},{"style":556},"--shiki-default:#032F62;--shiki-light:#032F62;--shiki-dark:#9ECBFF",[558],{"type":183,"value":559}," \"@quirekit\u002Fcore\"",{"type":527,"tag":48,"props":561,"children":562},{"style":545},[563],{"type":183,"value":564},";\n",{"type":527,"tag":48,"props":566,"children":567},{"class":50,"line":76},[568,572,577,581,586],{"type":527,"tag":48,"props":569,"children":570},{"style":539},[571],{"type":183,"value":542},{"type":527,"tag":48,"props":573,"children":574},{"style":545},[575],{"type":183,"value":576}," { DocsNote } ",{"type":527,"tag":48,"props":578,"children":579},{"style":539},[580],{"type":183,"value":553},{"type":527,"tag":48,"props":582,"children":583},{"style":556},[584],{"type":183,"value":585}," \".\u002Fnode\"",{"type":527,"tag":48,"props":587,"children":588},{"style":545},[589],{"type":183,"value":564},{"type":527,"tag":48,"props":591,"children":592},{"class":50,"line":89},[593,597,602,606,611],{"type":527,"tag":48,"props":594,"children":595},{"style":539},[596],{"type":183,"value":542},{"type":527,"tag":48,"props":598,"children":599},{"style":545},[600],{"type":183,"value":601}," { noteLayout } ",{"type":527,"tag":48,"props":603,"children":604},{"style":539},[605],{"type":183,"value":553},{"type":527,"tag":48,"props":607,"children":608},{"style":556},[609],{"type":183,"value":610}," \".\u002Flayout\"",{"type":527,"tag":48,"props":612,"children":613},{"style":545},[614],{"type":183,"value":564},{"type":527,"tag":48,"props":616,"children":617},{"class":50,"line":100},[618,622,627,631,636],{"type":527,"tag":48,"props":619,"children":620},{"style":539},[621],{"type":183,"value":542},{"type":527,"tag":48,"props":623,"children":624},{"style":545},[625],{"type":183,"value":626}," { noteSelection } ",{"type":527,"tag":48,"props":628,"children":629},{"style":539},[630],{"type":183,"value":553},{"type":527,"tag":48,"props":632,"children":633},{"style":556},[634],{"type":183,"value":635}," \".\u002Fselection\"",{"type":527,"tag":48,"props":637,"children":638},{"style":545},[639],{"type":183,"value":564},{"type":527,"tag":48,"props":641,"children":642},{"class":50,"line":111},[643],{"type":527,"tag":48,"props":644,"children":645},{"emptyLinePlaceholder":514},[646],{"type":183,"value":647},"\n",{"type":527,"tag":48,"props":649,"children":650},{"class":50,"line":122},[651,656,661,665],{"type":527,"tag":48,"props":652,"children":653},{"style":539},[654],{"type":183,"value":655},"declare",{"type":527,"tag":48,"props":657,"children":658},{"style":539},[659],{"type":183,"value":660}," module",{"type":527,"tag":48,"props":662,"children":663},{"style":556},[664],{"type":183,"value":559},{"type":527,"tag":48,"props":666,"children":667},{"style":545},[668],{"type":183,"value":669}," {\n",{"type":527,"tag":48,"props":671,"children":672},{"class":50,"line":255},[673],{"type":527,"tag":48,"props":674,"children":676},{"style":675},"--shiki-default:#6A737D;--shiki-light:#6A737D;--shiki-dark:#6A737D",[677],{"type":183,"value":678},"  \u002F** The same typed command registry used by direct, chain and can modes. *\u002F\n",{"type":527,"tag":48,"props":680,"children":681},{"class":50,"line":261},[682,687,693,698,703],{"type":527,"tag":48,"props":683,"children":684},{"style":539},[685],{"type":183,"value":686},"  interface",{"type":527,"tag":48,"props":688,"children":690},{"style":689},"--shiki-default:#6F42C1;--shiki-light:#6F42C1;--shiki-dark:#B392F0",[691],{"type":183,"value":692}," Commands",{"type":527,"tag":48,"props":694,"children":695},{"style":545},[696],{"type":183,"value":697},"\u003C",{"type":527,"tag":48,"props":699,"children":700},{"style":689},[701],{"type":183,"value":702},"ReturnType",{"type":527,"tag":48,"props":704,"children":705},{"style":545},[706],{"type":183,"value":707},"> {\n",{"type":527,"tag":48,"props":709,"children":711},{"class":50,"line":710},9,[712],{"type":527,"tag":48,"props":713,"children":714},{"style":675},[715],{"type":183,"value":716},"    \u002F** Feature-owned commands. *\u002F\n",{"type":527,"tag":48,"props":718,"children":720},{"class":50,"line":719},10,[721,727,731],{"type":527,"tag":48,"props":722,"children":724},{"style":723},"--shiki-default:#E36209;--shiki-light:#E36209;--shiki-dark:#FFAB70",[725],{"type":183,"value":726},"    docsNote",{"type":527,"tag":48,"props":728,"children":729},{"style":539},[730],{"type":183,"value":186},{"type":527,"tag":48,"props":732,"children":733},{"style":545},[734],{"type":183,"value":669},{"type":527,"tag":48,"props":736,"children":738},{"class":50,"line":737},11,[739,744,749,754,759,764],{"type":527,"tag":48,"props":740,"children":741},{"style":675},[742],{"type":183,"value":743},"      \u002F** ",{"type":527,"tag":48,"props":745,"children":746},{"style":539},[747],{"type":183,"value":748},"@param",{"type":527,"tag":48,"props":750,"children":751},{"style":545},[752],{"type":183,"value":753}," text",{"type":527,"tag":48,"props":755,"children":756},{"style":675},[757],{"type":183,"value":758}," - Paragraph text inside a new note. ",{"type":527,"tag":48,"props":760,"children":761},{"style":539},[762],{"type":183,"value":763},"@returns",{"type":527,"tag":48,"props":765,"children":766},{"style":675},[767],{"type":183,"value":768}," Whether insertion can run or was handled. *\u002F\n",{"type":527,"tag":48,"props":770,"children":772},{"class":50,"line":771},12,[773,778,782,787,791,795,800,804,808,813],{"type":527,"tag":48,"props":774,"children":775},{"style":689},[776],{"type":183,"value":777},"      insertDocsNote",{"type":527,"tag":48,"props":779,"children":780},{"style":539},[781],{"type":183,"value":186},{"type":527,"tag":48,"props":783,"children":784},{"style":545},[785],{"type":183,"value":786}," (",{"type":527,"tag":48,"props":788,"children":789},{"style":723},[790],{"type":183,"value":183},{"type":527,"tag":48,"props":792,"children":793},{"style":539},[794],{"type":183,"value":186},{"type":527,"tag":48,"props":796,"children":798},{"style":797},"--shiki-default:#005CC5;--shiki-light:#005CC5;--shiki-dark:#79B8FF",[799],{"type":183,"value":189},{"type":527,"tag":48,"props":801,"children":802},{"style":545},[803],{"type":183,"value":192},{"type":527,"tag":48,"props":805,"children":806},{"style":539},[807],{"type":183,"value":195},{"type":527,"tag":48,"props":809,"children":810},{"style":689},[811],{"type":183,"value":812}," ReturnType",{"type":527,"tag":48,"props":814,"children":815},{"style":545},[816],{"type":183,"value":564},{"type":527,"tag":48,"props":818,"children":820},{"class":50,"line":819},13,[821],{"type":527,"tag":48,"props":822,"children":823},{"style":545},[824],{"type":183,"value":825},"    };\n",{"type":527,"tag":48,"props":827,"children":829},{"class":50,"line":828},14,[830],{"type":527,"tag":48,"props":831,"children":832},{"style":545},[833],{"type":183,"value":834},"  }\n",{"type":527,"tag":48,"props":836,"children":838},{"class":50,"line":837},15,[839],{"type":527,"tag":48,"props":840,"children":841},{"style":545},[842],{"type":183,"value":843},"}\n",{"type":527,"tag":48,"props":845,"children":847},{"class":50,"line":846},16,[848],{"type":527,"tag":48,"props":849,"children":850},{"style":675},[851],{"type":183,"value":852},"\u002F** One installable feature owns schema, command, retained layout and structured selection. *\u002F\n",{"type":527,"tag":48,"props":854,"children":856},{"class":50,"line":855},17,[857,862,867,872,876,881,885],{"type":527,"tag":48,"props":858,"children":859},{"style":539},[860],{"type":183,"value":861},"export",{"type":527,"tag":48,"props":863,"children":864},{"style":539},[865],{"type":183,"value":866}," const",{"type":527,"tag":48,"props":868,"children":869},{"style":797},[870],{"type":183,"value":871}," DocsNoteFeature",{"type":527,"tag":48,"props":873,"children":874},{"style":539},[875],{"type":183,"value":62},{"type":527,"tag":48,"props":877,"children":878},{"style":545},[879],{"type":183,"value":880}," Extension.",{"type":527,"tag":48,"props":882,"children":883},{"style":689},[884],{"type":183,"value":70},{"type":527,"tag":48,"props":886,"children":887},{"style":545},[888],{"type":183,"value":73},{"type":527,"tag":48,"props":890,"children":892},{"class":50,"line":891},18,[893,897,902],{"type":527,"tag":48,"props":894,"children":895},{"style":545},[896],{"type":183,"value":79},{"type":527,"tag":48,"props":898,"children":899},{"style":556},[900],{"type":183,"value":901},"\"docsNoteFeature\"",{"type":527,"tag":48,"props":903,"children":904},{"style":545},[905],{"type":183,"value":86},{"type":527,"tag":48,"props":907,"children":909},{"class":50,"line":908},19,[910,915,919],{"type":527,"tag":48,"props":911,"children":912},{"style":675},[913],{"type":183,"value":914},"  \u002F** ",{"type":527,"tag":48,"props":916,"children":917},{"style":539},[918],{"type":183,"value":763},{"type":527,"tag":48,"props":920,"children":921},{"style":675},[922],{"type":183,"value":923}," Schema owner; no second document is maintained. *\u002F\n",{"type":527,"tag":48,"props":925,"children":927},{"class":50,"line":926},20,[928,933,938,943],{"type":527,"tag":48,"props":929,"children":930},{"style":689},[931],{"type":183,"value":932},"  addExtensions",{"type":527,"tag":48,"props":934,"children":935},{"style":545},[936],{"type":183,"value":937},"() { ",{"type":527,"tag":48,"props":939,"children":940},{"style":539},[941],{"type":183,"value":942},"return",{"type":527,"tag":48,"props":944,"children":945},{"style":545},[946],{"type":183,"value":947}," [DocsNote]; },\n",{"type":527,"tag":48,"props":949,"children":951},{"class":50,"line":950},21,[952,956,960],{"type":527,"tag":48,"props":953,"children":954},{"style":675},[955],{"type":183,"value":914},{"type":527,"tag":48,"props":957,"children":958},{"style":539},[959],{"type":183,"value":763},{"type":527,"tag":48,"props":961,"children":962},{"style":675},[963],{"type":183,"value":964}," Typed raw command factories, also safe in can() dry runs. *\u002F\n",{"type":527,"tag":48,"props":966,"children":968},{"class":50,"line":967},22,[969,974],{"type":527,"tag":48,"props":970,"children":971},{"style":689},[972],{"type":183,"value":973},"  addCommands",{"type":527,"tag":48,"props":975,"children":976},{"style":545},[977],{"type":183,"value":978},"() {\n",{"type":527,"tag":48,"props":980,"children":982},{"class":50,"line":981},23,[983,988],{"type":527,"tag":48,"props":984,"children":985},{"style":539},[986],{"type":183,"value":987},"    return",{"type":527,"tag":48,"props":989,"children":990},{"style":545},[991],{"type":183,"value":669},{"type":527,"tag":48,"props":993,"children":995},{"class":50,"line":994},24,[996,1000,1004,1008,1012,1016,1020,1024,1028,1032,1036,1040,1045,1049,1054,1059],{"type":527,"tag":48,"props":997,"children":998},{"style":689},[999],{"type":183,"value":777},{"type":527,"tag":48,"props":1001,"children":1002},{"style":545},[1003],{"type":183,"value":179},{"type":527,"tag":48,"props":1005,"children":1006},{"style":723},[1007],{"type":183,"value":183},{"type":527,"tag":48,"props":1009,"children":1010},{"style":539},[1011],{"type":183,"value":186},{"type":527,"tag":48,"props":1013,"children":1014},{"style":797},[1015],{"type":183,"value":189},{"type":527,"tag":48,"props":1017,"children":1018},{"style":545},[1019],{"type":183,"value":192},{"type":527,"tag":48,"props":1021,"children":1022},{"style":539},[1023],{"type":183,"value":195},{"type":527,"tag":48,"props":1025,"children":1026},{"style":545},[1027],{"type":183,"value":198},{"type":527,"tag":48,"props":1029,"children":1030},{"style":723},[1031],{"type":183,"value":201},{"type":527,"tag":48,"props":1033,"children":1034},{"style":545},[1035],{"type":183,"value":204},{"type":527,"tag":48,"props":1037,"children":1038},{"style":539},[1039],{"type":183,"value":195},{"type":527,"tag":48,"props":1041,"children":1042},{"style":545},[1043],{"type":183,"value":1044}," commands.",{"type":527,"tag":48,"props":1046,"children":1047},{"style":689},[1048],{"type":183,"value":215},{"type":527,"tag":48,"props":1050,"children":1051},{"style":545},[1052],{"type":183,"value":1053},"({ type: ",{"type":527,"tag":48,"props":1055,"children":1056},{"style":556},[1057],{"type":183,"value":1058},"\"docsNote\"",{"type":527,"tag":48,"props":1060,"children":1061},{"style":545},[1062],{"type":183,"value":86},{"type":527,"tag":48,"props":1064,"children":1066},{"class":50,"line":1065},25,[1067,1072,1077,1082,1087],{"type":527,"tag":48,"props":1068,"children":1069},{"style":545},[1070],{"type":183,"value":1071},"        content: [{ type: ",{"type":527,"tag":48,"props":1073,"children":1074},{"style":556},[1075],{"type":183,"value":1076},"\"paragraph\"",{"type":527,"tag":48,"props":1078,"children":1079},{"style":545},[1080],{"type":183,"value":1081},", content: [{ type: ",{"type":527,"tag":48,"props":1083,"children":1084},{"style":556},[1085],{"type":183,"value":1086},"\"text\"",{"type":527,"tag":48,"props":1088,"children":1089},{"style":545},[1090],{"type":183,"value":1091},", text }] }] }),\n",{"type":527,"tag":48,"props":1093,"children":1095},{"class":50,"line":1094},26,[1096],{"type":527,"tag":48,"props":1097,"children":1098},{"style":545},[1099],{"type":183,"value":825},{"type":527,"tag":48,"props":1101,"children":1103},{"class":50,"line":1102},27,[1104],{"type":527,"tag":48,"props":1105,"children":1106},{"style":545},[1107],{"type":183,"value":1108},"  },\n",{"type":527,"tag":48,"props":1110,"children":1112},{"class":50,"line":1111},28,[1113,1117,1121],{"type":527,"tag":48,"props":1114,"children":1115},{"style":675},[1116],{"type":183,"value":914},{"type":527,"tag":48,"props":1118,"children":1119},{"style":539},[1120],{"type":183,"value":763},{"type":527,"tag":48,"props":1122,"children":1123},{"style":675},[1124],{"type":183,"value":1125}," Renderer-neutral geometry owner. *\u002F\n",{"type":527,"tag":48,"props":1127,"children":1129},{"class":50,"line":1128},29,[1130,1135,1139,1143],{"type":527,"tag":48,"props":1131,"children":1132},{"style":689},[1133],{"type":183,"value":1134},"  addLayoutProviders",{"type":527,"tag":48,"props":1136,"children":1137},{"style":545},[1138],{"type":183,"value":937},{"type":527,"tag":48,"props":1140,"children":1141},{"style":539},[1142],{"type":183,"value":942},{"type":527,"tag":48,"props":1144,"children":1145},{"style":545},[1146],{"type":183,"value":1147}," [noteLayout]; },\n",{"type":527,"tag":48,"props":1149,"children":1151},{"class":50,"line":1150},30,[1152,1156,1160],{"type":527,"tag":48,"props":1153,"children":1154},{"style":675},[1155],{"type":183,"value":914},{"type":527,"tag":48,"props":1157,"children":1158},{"style":539},[1159],{"type":183,"value":763},{"type":527,"tag":48,"props":1161,"children":1162},{"style":675},[1163],{"type":183,"value":1164}," Structured crossing semantics, independently of hit testing. *\u002F\n",{"type":527,"tag":48,"props":1166,"children":1168},{"class":50,"line":1167},31,[1169,1174,1178,1182],{"type":527,"tag":48,"props":1170,"children":1171},{"style":689},[1172],{"type":183,"value":1173},"  addSelectionAdapters",{"type":527,"tag":48,"props":1175,"children":1176},{"style":545},[1177],{"type":183,"value":937},{"type":527,"tag":48,"props":1179,"children":1180},{"style":539},[1181],{"type":183,"value":942},{"type":527,"tag":48,"props":1183,"children":1184},{"style":545},[1185],{"type":183,"value":1186}," [noteSelection]; },\n",{"type":527,"tag":48,"props":1188,"children":1190},{"class":50,"line":1189},32,[1191],{"type":527,"tag":48,"props":1192,"children":1193},{"style":545},[1194],{"type":183,"value":1195},"});\n",{"type":527,"tag":497,"props":1197,"children":1198},{},[1199],{"type":183,"value":1200},"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);}",1793045207996]