[{"data":1,"prerenderedAt":336},["ShallowReactive",2],{"quirekit-doc:\u002Fplugins\u002Freference\u002Fblock-rich-content":3},{"id":4,"title":5,"body":6,"description":12,"extension":323,"keywords":324,"locale":327,"meta":328,"navigation":329,"order":330,"path":331,"section":332,"seo":333,"stem":334,"__hash__":335},"docs\u002Fplugins\u002Freference\u002Fblock-rich-content.zh-CN.md","BlockRichContent · 富内容服务",{"type":7,"value":8,"toc":309},"minimark",[9,13,24,28,34,84,92,95,111,123,147,154,157,168,172,175,182,187,190,196,202,206,209,214,219,223,226,231,235,238,245,271,279,282,293,305],[10,11,12],"p",{},"分栏、模板、网页卡片与资源节点共用的宿主服务与插入合同：单文件大小上限、文件存储与网页元数据解析。未提供存储时文件以 data URL 保存在正文中。",[10,14,15,19,20],{},[16,17,18],"code",{},"@quirekit\u002Fblock-editor"," · ",[21,22,23],"strong",{},"AGPL-3.0-only",[25,26,27],"h2",{"id":27},"编辑器适用范围",[10,29,30,31],{},"层次：",[21,32,33],{},"Block 产品适配",[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],{},"该入口面向 Block 连续流，不接入 Classic 分页产品。需要共享语义时选择相应 Word 或通用能力及 Classic 装配。",[41,69,70,73,76],{},[59,71,72],{},"Block",[59,74,75],{},"直接支持",[59,77,78,83],{},[79,80,82],"a",{"href":81},"\u002Fplugins\u002Freference\u002Fcreate-block-editor-preset","createBlockEditorPreset"," — createBlockEditor 默认预设已装配此能力。通过 preset 中对应子项配置；图形编辑使用预设注入的工作区，宿主仍负责保存和资源。不要重复安装同名扩展。",[10,85,86,87,91],{},"“直接支持”指已有上述产品装配；具体交互、宿主服务和格式支持仍有各自条件。",[79,88,90],{"href":89},"\u002Fplugins\u002Fcompatibility","状态与接入规则","。许可独立显示。",[25,93,94],{"id":94},"接入",[96,97,102],"pre",{"className":98,"code":99,"language":100,"meta":101,"style":101},"language-sh shiki shiki-themes github-light github-light github-dark","pnpm add @quirekit\u002Fblock-editor@alpha\n","sh","",[16,103,104],{"__ignoreMap":101},[105,106,109],"span",{"class":107,"line":108},"line",1,[105,110,99],{},[10,112,113,114,117,118,122],{},"在创建 Editor 时放入 ",[16,115,116],{},"extensions","。挂载容器、视图和保存由宿主提供，见",[79,119,121],{"href":120},"\u002Fguide\u002Fquick-start","快速开始","。",[96,124,128],{"className":125,"code":126,"language":127,"meta":101,"style":101},"language-ts shiki shiki-themes github-light github-light github-dark","import { BlockRichContent } from '@quirekit\u002Fblock-editor'\n","ts",[16,129,130],{"__ignoreMap":101},[105,131,132,136,140,143],{"class":107,"line":108},[105,133,135],{"class":134},"sDD9d","import",[105,137,139],{"class":138},"sVPnS"," { BlockRichContent } ",[105,141,142],{"class":134},"from",[105,144,146],{"class":145},"s-HEn"," '@quirekit\u002Fblock-editor'\n",[10,148,149,150,122],{},"安装时按包声明选择兼容版本，外部可用版本以分发源为准。本站使用工作区 Alpha；许可标签来自入口所属包，使用条件见",[79,151,153],{"href":152},"\u002Fsupport","支持与许可",[25,155,156],{"id":156},"按编辑器接入",[10,158,159,160,163,164,167],{},"以下片段沿用已挂载的宿主元素 ",[16,161,162],{},"element","，宿主负责容器尺寸与保存；退出页面时调用 ",[16,165,166],{},"instance.destroy()","。已有预设装配的能力不要再重复追加；需要宿主端口的入口应先完成下方配置。",[169,170],"plugin-integration",{"name":171},"BlockRichContent",[25,173,174],{"id":174},"配置",[10,176,177,178,122],{},"下面是扩展自身的默认选项。预设可以覆盖这些值；它们不等于当前文档属性。配置方法见",[79,179,181],{"href":180},"\u002Fplugins\u002Fconfiguration","配置插件",[183,184,186],"h3",{"id":185},"maxfilesize","maxFileSize",[10,188,189],{},"单个本地文件的字节上限，默认 4 MiB；超出时插入前即提示，不写入文档。",[10,191,192,193],{},"类型：",[16,194,195],{},"number",[10,197,198,199],{},"默认：",[16,200,201],{},"4 * 1024 * 1024",[183,203,205],{"id":204},"storefile","storeFile",[10,207,208],{},"宿主文件存储函数，接收文件、取消信号与进度回调，返回持久地址。未提供时文件以 data URL 保存在正文 JSON 中。",[10,210,192,211],{},[16,212,213],{},"(file: File, signal: AbortSignal, progress: (percent: number) => void): Promise\u003CBlockResource>",[10,215,198,216],{},[16,217,218],{},"undefined",[183,220,222],{"id":221},"resolvewebcard","resolveWebCard",[10,224,225],{},"宿主网页元数据解析函数，返回标题、描述、图标与封面。浏览器不会自行跨域抓取网页。",[10,227,192,228],{},[16,229,230],{},"(url: string, signal: AbortSignal): Promise\u003C{ title?: string; description?: string; icon?: string; cover?: string; }>",[10,232,198,233],{},[16,234,218],{},[25,236,237],{"id":237},"命令与运行方式",[10,239,240,241,244],{},"以下命令由此扩展直接提供，均在当前 Editor 上调用。命令是否可用由已安装 schema、当前选区与保护策略决定；可以先用 ",[16,242,243],{},"editor.can()"," 查询。",[35,246,247,257],{},[38,248,249],{},[41,250,251,254],{},[44,252,253],{},"命令",[44,255,256],{},"参数签名",[54,258,259],{},[41,260,261,266],{},[59,262,263],{},[16,264,265],{},"applyBlockRichContent",[59,267,268],{},[16,269,270],{},"applyBlockRichContent(request: RichContentRequest, content: readonly QuireJSONContent[])",[10,272,273,274,278],{},"这里只展示参数签名。接界面时见",[79,275,277],{"href":276},"\u002Fbuild\u002Fcommands","命令与控件","，正文变更继续经过同一事务与历史。",[25,280,281],{"id":281},"下一步",[10,283,284,285,289,290,292],{},"返回",[79,286,288],{"href":287},"\u002Fplugins","全部插件","，或阅读",[79,291,181],{"href":180},"区分配置、文档属性与命令。",[10,294,295,296,300,301,122],{},"自己定义能力时见",[79,297,299],{"href":298},"\u002Fbuild\u002Fextension","扩展开发","；搭建完整宿主时见",[79,302,304],{"href":303},"\u002Fbuild","构建产品",[306,307,308],"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":101,"searchDepth":310,"depth":310,"links":311},2,[312,313,314,315,321,322],{"id":27,"depth":310,"text":27},{"id":94,"depth":310,"text":94},{"id":156,"depth":310,"text":156},{"id":174,"depth":310,"text":174,"children":316},[317,319,320],{"id":185,"depth":318,"text":186},3,{"id":204,"depth":318,"text":205},{"id":221,"depth":318,"text":222},{"id":237,"depth":310,"text":237},{"id":281,"depth":310,"text":281},"md",[171,18,325,326,186,205,222,265,171],"富内容服务","block","zh-CN",{"navigationTitle":171,"license":23},true,16,"\u002Fplugins\u002Freference\u002Fblock-rich-content","Block 产品扩展",{"title":5,"description":12},"plugins\u002Freference\u002Fblock-rich-content.zh-CN","_64kn9srYiYqVy37NT9fWll3qHgAseTddZpS8pDQL3k",1793045218528]