[{"data":1,"prerenderedAt":399},["ShallowReactive",2],{"quirekit-doc:\u002Fplugins\u002Freference\u002Flanguage":3},{"id":4,"title":5,"body":6,"description":12,"extension":386,"keywords":387,"locale":390,"meta":391,"navigation":392,"order":393,"path":394,"section":395,"seo":396,"stem":397,"__hash__":398},"docs\u002Fplugins\u002Freference\u002Flanguage.zh-CN.md","Language · 文字语言",{"type":7,"value":8,"toc":374},"minimark",[9,13,24,28,34,87,95,98,114,126,150,157,160,171,175,178,185,189,192,198,204,207,214,336,344,347,358,370],[10,11,12],"p",{},"分别保存西文、东亚和复杂文种语言信息。它用于文字语义与校对，不会翻译正文或切换产品界面语言。",[10,14,15,19,20],{},[16,17,18],"code",{},"@quirekit\u002Fextension-text-style"," · ",[21,22,23],"strong",{},"MIT",[25,26,27],"h2",{"id":27},"编辑器适用范围",[10,29,30,31],{},"层次：",[21,32,33],{},"共享文档能力",[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,73],"tbody",{},[41,57,58,62,65],{},[59,60,61],"td",{},"Classic",[59,63,64],{},"直接支持",[59,66,67,72],{},[68,69,71],"a",{"href":70},"\u002Fplugins\u002Freference\u002Fclassic-editor-preset","classicEditorPreset"," — 使用产品中立的 classicEditorPreset；已有能力由预设装配，不要重复追加。Word 预设会替换段落、标题和容器列表，不能把通用结构直接叠加到 Word 模型。",[41,74,75,78,80],{},[59,76,77],{},"Block",[59,79,64],{},[59,81,82,86],{},[68,83,85],{"href":84},"\u002Fplugins\u002Freference\u002Fcreate-block-editor-preset","createBlockEditorPreset"," — createBlockEditor 默认预设已装配此能力。通过 preset 中对应子项配置；图形编辑使用预设注入的工作区，宿主仍负责保存和资源。不要重复安装同名扩展。",[10,88,89,90,94],{},"“直接支持”指已有上述产品装配；具体交互、宿主服务和格式支持仍有各自条件。",[68,91,93],{"href":92},"\u002Fplugins\u002Fcompatibility","状态与接入规则","。许可独立显示。",[25,96,97],{"id":97},"接入",[99,100,105],"pre",{"className":101,"code":102,"language":103,"meta":104,"style":104},"language-sh shiki shiki-themes github-light github-light github-dark","pnpm add @quirekit\u002Fextension-text-style@alpha\n","sh","",[16,106,107],{"__ignoreMap":104},[108,109,112],"span",{"class":110,"line":111},"line",1,[108,113,102],{},[10,115,116,117,120,121,125],{},"在创建 Editor 时放入 ",[16,118,119],{},"extensions","。挂载容器、视图和保存由宿主提供，见",[68,122,124],{"href":123},"\u002Fguide\u002Fquick-start","快速开始","。",[99,127,131],{"className":128,"code":129,"language":130,"meta":104,"style":104},"language-ts shiki shiki-themes github-light github-light github-dark","import { Language } from '@quirekit\u002Fextension-text-style'\n","ts",[16,132,133],{"__ignoreMap":104},[108,134,135,139,143,146],{"class":110,"line":111},[108,136,138],{"class":137},"sDD9d","import",[108,140,142],{"class":141},"sVPnS"," { Language } ",[108,144,145],{"class":137},"from",[108,147,149],{"class":148},"s-HEn"," '@quirekit\u002Fextension-text-style'\n",[10,151,152,153,125],{},"安装时按包声明选择兼容版本，外部可用版本以分发源为准。本站使用工作区 Alpha；许可标签来自入口所属包，使用条件见",[68,154,156],{"href":155},"\u002Fsupport","支持与许可",[25,158,159],{"id":159},"按编辑器接入",[10,161,162,163,166,167,170],{},"以下片段沿用已挂载的宿主元素 ",[16,164,165],{},"element","，宿主负责容器尺寸与保存；退出页面时调用 ",[16,168,169],{},"instance.destroy()","。已有预设装配的能力不要再重复追加；需要宿主端口的入口应先完成下方配置。",[172,173],"plugin-integration",{"name":174},"Language",[25,176,177],{"id":177},"配置",[10,179,180,181,125],{},"下面是扩展自身的默认选项。预设可以覆盖这些值；它们不等于当前文档属性。配置方法见",[68,182,184],{"href":183},"\u002Fplugins\u002Fconfiguration","配置插件",[186,187,188],"h3",{"id":188},"types",[10,190,191],{},"需要附加此能力的节点或标记类型名，必须与当前 schema 的实际名称一致。",[10,193,194,195],{},"类型：",[16,196,197],{},"string[]",[10,199,200,201],{},"默认：",[16,202,203],{},"[\"textStyle\"]",[25,205,206],{"id":206},"命令与运行方式",[10,208,209,210,213],{},"以下命令由此扩展直接提供，均在当前 Editor 上调用。命令是否可用由已安装 schema、当前选区与保护策略决定；可以先用 ",[16,211,212],{},"editor.can()"," 查询。",[35,215,216,226],{},[38,217,218],{},[41,219,220,223],{},[44,221,222],{},"命令",[44,224,225],{},"参数签名",[54,227,228,240,252,264,276,288,300,312,324],{},[41,229,230,235],{},[59,231,232],{},[16,233,234],{},"setLanguage",[59,236,237],{},[16,238,239],{},"setLanguage(language: string)",[41,241,242,247],{},[59,243,244],{},[16,245,246],{},"setLanguageSlots",[59,248,249],{},[16,250,251],{},"setLanguageSlots(languages: RunLanguageSlots)",[41,253,254,259],{},[59,255,256],{},[16,257,258],{},"unsetLanguage",[59,260,261],{},[16,262,263],{},"unsetLanguage()",[41,265,266,271],{},[59,267,268],{},[16,269,270],{},"setLatinLanguage",[59,272,273],{},[16,274,275],{},"setLatinLanguage(language: string)",[41,277,278,283],{},[59,279,280],{},[16,281,282],{},"unsetLatinLanguage",[59,284,285],{},[16,286,287],{},"unsetLatinLanguage()",[41,289,290,295],{},[59,291,292],{},[16,293,294],{},"setEastAsiaLanguage",[59,296,297],{},[16,298,299],{},"setEastAsiaLanguage(language: string)",[41,301,302,307],{},[59,303,304],{},[16,305,306],{},"unsetEastAsiaLanguage",[59,308,309],{},[16,310,311],{},"unsetEastAsiaLanguage()",[41,313,314,319],{},[59,315,316],{},[16,317,318],{},"setComplexScriptLanguage",[59,320,321],{},[16,322,323],{},"setComplexScriptLanguage(language: string)",[41,325,326,331],{},[59,327,328],{},[16,329,330],{},"unsetComplexScriptLanguage",[59,332,333],{},[16,334,335],{},"unsetComplexScriptLanguage()",[10,337,338,339,343],{},"这里只展示参数签名。接界面时见",[68,340,342],{"href":341},"\u002Fbuild\u002Fcommands","命令与控件","，正文变更继续经过同一事务与历史。",[25,345,346],{"id":346},"下一步",[10,348,349,350,354,355,357],{},"返回",[68,351,353],{"href":352},"\u002Fplugins","全部插件","，或阅读",[68,356,184],{"href":183},"区分配置、文档属性与命令。",[10,359,360,361,365,366,125],{},"自己定义能力时见",[68,362,364],{"href":363},"\u002Fbuild\u002Fextension","扩展开发","；搭建完整宿主时见",[68,367,369],{"href":368},"\u002Fbuild","构建产品",[371,372,373],"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}",{"title":104,"searchDepth":375,"depth":375,"links":376},2,[377,378,379,380,384,385],{"id":27,"depth":375,"text":27},{"id":97,"depth":375,"text":97},{"id":159,"depth":375,"text":159},{"id":177,"depth":375,"text":177,"children":381},[382],{"id":188,"depth":383,"text":188},3,{"id":206,"depth":375,"text":206},{"id":346,"depth":375,"text":346},"md",[174,18,388,389,188,234,246,258,270,282,294,306,318,330,174],"文字语言","marks","zh-CN",{"navigationTitle":174,"license":23},true,112,"\u002Fplugins\u002Freference\u002Flanguage","文字与样式",{"title":5,"description":12},"plugins\u002Freference\u002Flanguage.zh-CN","GqnXAXt_ZfiJ1me5r9EiRQX8tQetXFze807iZaD2cgk",1793045212307]