[{"data":1,"prerenderedAt":342},["ShallowReactive",2],{"quirekit-doc:\u002Fplugins\u002Freference\u002Fcommands-extension":3},{"id":4,"title":5,"body":6,"description":12,"extension":329,"keywords":330,"locale":333,"meta":334,"navigation":335,"order":336,"path":337,"section":338,"seo":339,"stem":340,"__hash__":341},"docs\u002Fplugins\u002Freference\u002Fcommands-extension.zh-CN.md","CommandsExtension · 基础命令",{"type":7,"value":8,"toc":320},"minimark",[9,13,24,28,34,77,86,89,105,116,124,127,138,142,145,148,151,158,280,288,291,304,316],[10,11,12],"p",{},"提供 Core 的基础命令集合。Editor 默认安装，通过 enableCoreExtensions 管理；通常不需要手动放入 extensions。",[10,14,15,19,20],{},[16,17,18],"code",{},"@quirekit\u002Fcore"," · ",[21,22,23],"strong",{},"MIT",[25,26,27],"h2",{"id":27},"编辑器适用范围",[10,29,30,31],{},"层次：",[21,32,33],{},"Core 内置能力",[35,36,37,53],"table",{},[38,39,40],"thead",{},[41,42,43,47,50],"tr",{},[44,45,46],"th",{},"编辑器",[44,48,49],{},"状态",[44,51,52],{},"所需装配与边界",[54,55,56,68],"tbody",{},[41,57,58,62,65],{},[59,60,61],"td",{},"Classic",[59,63,64],{},"直接支持",[59,66,67],{},"由产品创建的 Core 自动安装，通过 Core 的 enableCoreExtensions 和 coreExtensionOptions 管理，不重复追加。视图事件的具体行为仍以当前 View 为准。",[41,69,70,73,75],{},[59,71,72],{},"Block",[59,74,64],{},[59,76,67],{},[10,78,79,80,85],{},"“直接支持”指已有上述产品装配；具体交互、宿主服务和格式支持仍有各自条件。",[81,82,84],"a",{"href":83},"\u002Fplugins\u002Fcompatibility","状态与接入规则","。许可独立显示。",[25,87,88],{"id":88},"接入",[90,91,96],"pre",{"className":92,"code":93,"language":94,"meta":95,"style":95},"language-sh shiki shiki-themes github-light github-light github-dark","pnpm add @quirekit\u002Fcore@alpha\n","sh","",[16,97,98],{"__ignoreMap":95},[99,100,103],"span",{"class":101,"line":102},"line",1,[99,104,93],{},[10,106,107,108,111,112,115],{},"Editor 默认安装此内置扩展。使用 ",[16,109,110],{},"enableCoreExtensions"," 控制启用，特定选项放在 ",[16,113,114],{},"coreExtensionOptions","；不要再次追加同名扩展。",[10,117,118,119,123],{},"安装时按包声明选择兼容版本，外部可用版本以分发源为准。本站使用工作区 Alpha；许可标签来自入口所属包，使用条件见",[81,120,122],{"href":121},"\u002Fsupport","支持与许可","。",[25,125,126],{"id":126},"按编辑器接入",[10,128,129,130,133,134,137],{},"以下片段沿用已挂载的宿主元素 ",[16,131,132],{},"element","，宿主负责容器尺寸与保存；退出页面时调用 ",[16,135,136],{},"instance.destroy()","。已有预设装配的能力不要再重复追加；需要宿主端口的入口应先完成下方配置。",[139,140],"plugin-integration",{"name":141},"CommandsExtension",[25,143,144],{"id":144},"配置",[10,146,147],{},"此入口没有独立的配置字段。文档属性通过领域命令设置；产品预设可能继续装配其他可配置子扩展。",[25,149,150],{"id":150},"命令与运行方式",[10,152,153,154,157],{},"以下命令由此扩展直接提供，均在当前 Editor 上调用。命令是否可用由已安装 schema、当前选区与保护策略决定；可以先用 ",[16,155,156],{},"editor.can()"," 查询。",[35,159,160,170],{},[38,161,162],{},[41,163,164,167],{},[44,165,166],{},"命令",[44,168,169],{},"参数签名",[54,171,172,184,196,208,220,232,244,256,268],{},[41,173,174,179],{},[59,175,176],{},[16,177,178],{},"extendMarkRange",[59,180,181],{},[16,182,183],{},"extendMarkRange(typeOrName: QuireMarkTypeInput, attributes?: Readonly\u003CRecord\u003Cstring, unknown>>)",[41,185,186,191],{},[59,187,188],{},[16,189,190],{},"resetAttributes",[59,192,193],{},[16,194,195],{},"resetAttributes(typeOrName: QuireAttributeTypeInput, attributes: string | readonly string[])",[41,197,198,203],{},[59,199,200],{},[16,201,202],{},"setMark",[59,204,205],{},[16,206,207],{},"setMark(typeOrName: QuireMarkTypeInput, attrs?: Attrs | null)",[41,209,210,215],{},[59,211,212],{},[16,213,214],{},"setMeta",[59,216,217],{},[16,218,219],{},"setMeta(key: unknown, value: unknown)",[41,221,222,227],{},[59,223,224],{},[16,225,226],{},"toggleMark",[59,228,229],{},[16,230,231],{},"toggleMark(typeOrName: QuireMarkTypeInput, attrs?: Attrs | null, options?: QuireToggleMarkOptions)",[41,233,234,239],{},[59,235,236],{},[16,237,238],{},"unsetAllMarks",[59,240,241],{},[16,242,243],{},"unsetAllMarks()",[41,245,246,251],{},[59,247,248],{},[16,249,250],{},"unsetMark",[59,252,253],{},[16,254,255],{},"unsetMark(typeOrName: QuireMarkTypeInput, options?: QuireUnsetMarkOptions)",[41,257,258,263],{},[59,259,260],{},[16,261,262],{},"updateAttributes",[59,264,265],{},[16,266,267],{},"updateAttributes(typeOrName: QuireAttributeTypeInput, attributes?: Readonly\u003CRecord\u003Cstring, unknown>>)",[41,269,270,275],{},[59,271,272],{},[16,273,274],{},"updateDecorations",[59,276,277],{},[16,278,279],{},"updateDecorations(extensionName?: string | undefined)",[10,281,282,283,287],{},"这里只展示参数签名。接界面时见",[81,284,286],{"href":285},"\u002Fbuild\u002Fcommands","命令与控件","，正文变更继续经过同一事务与历史。",[25,289,290],{"id":290},"下一步",[10,292,293,294,298,299,303],{},"返回",[81,295,297],{"href":296},"\u002Fplugins","全部插件","，或阅读",[81,300,302],{"href":301},"\u002Fplugins\u002Fconfiguration","配置插件","区分配置、文档属性与命令。",[10,305,306,307,311,312,123],{},"自己定义能力时见",[81,308,310],{"href":309},"\u002Fbuild\u002Fextension","扩展开发","；搭建完整宿主时见",[81,313,315],{"href":314},"\u002Fbuild","构建产品",[317,318,319],"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);}",{"title":95,"searchDepth":321,"depth":321,"links":322},2,[323,324,325,326,327,328],{"id":27,"depth":321,"text":27},{"id":88,"depth":321,"text":88},{"id":126,"depth":321,"text":126},{"id":144,"depth":321,"text":144},{"id":150,"depth":321,"text":150},{"id":290,"depth":321,"text":290},"md",[141,18,331,332,178,190,202,214,226,238,250,262,274,141],"基础命令","builtin","zh-CN",{"navigationTitle":141,"license":23},true,74,"\u002Fplugins\u002Freference\u002Fcommands-extension","Core 内置扩展",{"title":5,"description":12},"plugins\u002Freference\u002Fcommands-extension.zh-CN","Et0h022ddIubaWIOp6oNzQRMsfUIJ9ZeipXu5n7sviU",1793045223239]