[{"data":1,"prerenderedAt":330},["ShallowReactive",2],{"quirekit-doc:\u002Fplugins\u002Freference\u002Fcolor":3},{"id":4,"title":5,"body":6,"description":12,"extension":317,"keywords":318,"locale":321,"meta":322,"navigation":323,"order":324,"path":325,"section":326,"seo":327,"stem":328,"__hash__":329},"docs\u002Fplugins\u002Freference\u002Fcolor.zh-CN.md","Color · 文字颜色",{"type":7,"value":8,"toc":304},"minimark",[9,13,24,28,34,87,95,98,114,126,150,157,160,171,175,178,185,189,192,198,204,207,214,252,260,263,274,277,288,300],[10,11,12],"p",{},"在 textStyle 上保存文字前景色。types 指定属性附着的标记名称，实际颜色通过 setColor 命令传入。",[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 { Color } 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"," { Color } ",[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},"Color",[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],{},[41,229,230,235],{},[59,231,232],{},[16,233,234],{},"setColor",[59,236,237],{},[16,238,239],{},"setColor(color: string)",[41,241,242,247],{},[59,243,244],{},[16,245,246],{},"unsetColor",[59,248,249],{},[16,250,251],{},"unsetColor()",[10,253,254,255,259],{},"这里只展示参数签名。接界面时见",[68,256,258],{"href":257},"\u002Fbuild\u002Fcommands","命令与控件","，正文变更继续经过同一事务与历史。",[25,261,262],{"id":262},"其他公开入口",[264,265,266],"ul",{},[267,268,269,19,272],"li",{},[16,270,271],{},"colorExtension",[16,273,18],{},[25,275,276],{"id":276},"下一步",[10,278,279,280,284,285,287],{},"返回",[68,281,283],{"href":282},"\u002Fplugins","全部插件","，或阅读",[68,286,184],{"href":183},"区分配置、文档属性与命令。",[10,289,290,291,295,296,125],{},"自己定义能力时见",[68,292,294],{"href":293},"\u002Fbuild\u002Fextension","扩展开发","；搭建完整宿主时见",[68,297,299],{"href":298},"\u002Fbuild","构建产品",[301,302,303],"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":305,"depth":305,"links":306},2,[307,308,309,310,314,315,316],{"id":27,"depth":305,"text":27},{"id":97,"depth":305,"text":97},{"id":159,"depth":305,"text":159},{"id":177,"depth":305,"text":177,"children":311},[312],{"id":188,"depth":313,"text":188},3,{"id":206,"depth":305,"text":206},{"id":262,"depth":305,"text":262},{"id":276,"depth":305,"text":276},"md",[174,18,319,320,188,234,246,174,271],"文字颜色","marks","zh-CN",{"navigationTitle":174,"license":23},true,73,"\u002Fplugins\u002Freference\u002Fcolor","文字与样式",{"title":5,"description":12},"plugins\u002Freference\u002Fcolor.zh-CN","QNQSiwnlIOqVUBOLMbSceoUey2I4REY1ni-VOjq1CSM",1793045212049]