[{"data":1,"prerenderedAt":619},["ShallowReactive",2],{"quirekit-doc:\u002Fplugins\u002Freference\u002Fproofing":3},{"id":4,"title":5,"body":6,"description":12,"extension":606,"keywords":607,"locale":610,"meta":611,"navigation":612,"order":613,"path":614,"section":615,"seo":616,"stem":617,"__hash__":618},"docs\u002Fplugins\u002Freference\u002Fproofing.zh-CN.md","Proofing · 拼写与语法校对",{"type":7,"value":8,"toc":579},"minimark",[9,13,24,28,34,84,92,95,111,123,147,154,157,168,172,175,182,186,189,195,201,204,207,212,217,220,223,228,232,236,239,244,249,253,256,261,266,270,273,277,282,286,289,293,298,302,305,309,314,318,321,325,330,334,337,341,346,350,353,357,362,366,369,373,377,381,384,389,393,396,399,404,409,413,416,421,425,429,432,437,442,445,452,538,546,549,552,563,575],[10,11,12],"p",{},"把文本分段提交给宿主提供的校对 provider，显示临时问题标记。provider 默认为 null，仅安装扩展不会产生校对结果。",[10,14,15,19,20],{},[16,17,18],"code",{},"@quirekit\u002Fextension-proofing"," · ",[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\u002Fcreate-classic-word-preset","createClassicWordPreset"," — 使用 createClassicWordPreset 装配 Word 模型、布局与产品适配；具体控件、开关、宿主服务及文件支持以本页说明为准。批注、修订和内容控件的完整创作界面另需 Pro。",[41,74,75,78,81],{},[59,76,77],{},"Block",[59,79,80],{},"需适配",[59,82,83],{},"需由宿主连接本页所列服务、目标与生命周期，并验证所选 View 和文档模型。核心接口可复用，但没有一段无宿主参数的通用产品安装代码。",[10,85,86,87,91],{},"“直接支持”指已有上述产品装配；具体交互、宿主服务和格式支持仍有各自条件。",[68,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\u002Fextension-proofing@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","。挂载容器、视图和保存由宿主提供，见",[68,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 { Proofing } from '@quirekit\u002Fextension-proofing'\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"," { Proofing } ",[105,141,142],{"class":134},"from",[105,144,146],{"class":145},"s-HEn"," '@quirekit\u002Fextension-proofing'\n",[10,148,149,150,122],{},"安装时按包声明选择兼容版本，外部可用版本以分发源为准。本站使用工作区 Alpha；许可标签来自入口所属包，使用条件见",[68,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},"Proofing",[25,173,174],{"id":174},"配置",[10,176,177,178,122],{},"下面是扩展自身的默认选项。预设可以覆盖这些值；它们不等于当前文档属性。配置方法见",[68,179,181],{"href":180},"\u002Fplugins\u002Fconfiguration","配置插件",[183,184,185],"h3",{"id":185},"enabled",[10,187,188],{},"是否启用此能力的会话行为。禁用不会删除规范文档内容。",[10,190,191,192],{},"类型：",[16,193,194],{},"boolean",[10,196,197,198],{},"默认：",[16,199,200],{},"true",[183,202,203],{"id":203},"provider",[10,205,206],{},"校对服务接口。默认 null 不执行检查；宿主提供拼写、语法服务或选择独立 provider 适配包。",[10,208,191,209],{},[16,210,211],{},"ProofingProvider | null",[10,213,197,214],{},[16,215,216],{},"null",[183,218,219],{"id":219},"policy",[10,221,222],{},"校对时的策略适配，用于语言、分段或业务范围等规则。",[10,224,191,225],{},[16,226,227],{},"ProofingDocumentPolicy | null",[10,229,197,230],{},[16,231,216],{},[183,233,235],{"id":234},"defaultlanguage","defaultLanguage",[10,237,238],{},"未从文本读取到语言时使用的默认语言；CodeBlock 中则是代码语言值。",[10,240,191,241],{},[16,242,243],{},"string | null",[10,245,197,246],{},[16,247,248],{},"\"en-US\"",[183,250,252],{"id":251},"debouncems","debounceMs",[10,254,255],{},"连续输入后等待再检查的延迟，单位为毫秒。",[10,257,191,258],{},[16,259,260],{},"number",[10,262,197,263],{},[16,264,265],{},"400",[183,267,269],{"id":268},"maxwaitms","maxWaitMs",[10,271,272],{},"连续输入期间允许推迟校对的最长时间，单位为毫秒。",[10,274,191,275],{},[16,276,260],{},[10,278,197,279],{},[16,280,281],{},"2000",[183,283,285],{"id":284},"timeoutms","timeoutMs",[10,287,288],{},"单次校对请求超时，单位为毫秒。",[10,290,191,291],{},[16,292,260],{},[10,294,197,295],{},[16,296,297],{},"10000",[183,299,301],{"id":300},"maxconcurrentrequests","maxConcurrentRequests",[10,303,304],{},"最多同时执行的校对请求数。",[10,306,191,307],{},[16,308,260],{},[10,310,197,311],{},[16,312,313],{},"2",[183,315,317],{"id":316},"maxsegmentsperbatch","maxSegmentsPerBatch",[10,319,320],{},"每批提交的最大文本分段数。",[10,322,191,323],{},[16,324,260],{},[10,326,197,327],{},[16,328,329],{},"40",[183,331,333],{"id":332},"maxcharactersperbatch","maxCharactersPerBatch",[10,335,336],{},"每批提交的最大字符数。",[10,338,191,339],{},[16,340,260],{},[10,342,197,343],{},[16,344,345],{},"8000",[183,347,349],{"id":348},"maxsuggestions","maxSuggestions",[10,351,352],{},"每个校对问题最多保留的建议数。",[10,354,191,355],{},[16,356,260],{},[10,358,197,359],{},[16,360,361],{},"5",[183,363,365],{"id":364},"maxissues","maxIssues",[10,367,368],{},"会话最多保留的问题数量，避免无界增长。",[10,370,191,371],{},[16,372,260],{},[10,374,197,375],{},[16,376,281],{},[183,378,380],{"id":379},"dictionarystore","dictionaryStore",[10,382,383],{},"个人词典的宿主持久化接口。未提供时不承诺跨页面保留。",[10,385,191,386],{},[16,387,388],{},"ProofingDictionaryStore | null",[10,390,197,391],{},[16,392,216],{},[183,394,395],{"id":395},"appearance",[10,397,398],{},"拼写、语法与风格问题的下划线颜色配置。",[10,400,191,401],{},[16,402,403],{},"ProofingAppearance",[10,405,197,406],{},[16,407,408],{},"{ spelling: \"#e5484d\", grammar: \"#3e63dd\", style: \"#8e4ec6\" }",[183,410,412],{"id":411},"onerror","onError",[10,414,415],{},"校对发生错误时的回调；用于宿主反馈或记录失败。",[10,417,191,418],{},[16,419,420],{},"((error: ProofingError) => void) | null",[10,422,197,423],{},[16,424,216],{},[183,426,428],{"id":427},"resolvevisiblerange","resolveVisibleRange",[10,430,431],{},"读取当前可见文档范围，供校对调度优先处理。默认实现使用已挂载视图。",[10,433,191,434],{},[16,435,436],{},"((editor: QuireEditor) => ProofingRange | null) | null",[10,438,197,439],{},[16,440,441],{},"resolveDefaultProofingVisibleRange",[25,443,444],{"id":444},"命令与运行方式",[10,446,447,448,451],{},"以下命令由此扩展直接提供，均在当前 Editor 上调用。命令是否可用由已安装 schema、当前选区与保护策略决定；可以先用 ",[16,449,450],{},"editor.can()"," 查询。",[35,453,454,464],{},[38,455,456],{},[41,457,458,461],{},[44,459,460],{},"命令",[44,462,463],{},"参数签名",[54,465,466,478,490,502,514,526],{},[41,467,468,473],{},[59,469,470],{},[16,471,472],{},"setProofingEnabled",[59,474,475],{},[16,476,477],{},"setProofingEnabled(enabled: boolean)",[41,479,480,485],{},[59,481,482],{},[16,483,484],{},"recheckProofing",[59,486,487],{},[16,488,489],{},"recheckProofing()",[41,491,492,497],{},[59,493,494],{},[16,495,496],{},"replaceProofingIssue",[59,498,499],{},[16,500,501],{},"replaceProofingIssue(issueId: string, replacement: string)",[41,503,504,509],{},[59,505,506],{},[16,507,508],{},"ignoreProofingIssue",[59,510,511],{},[16,512,513],{},"ignoreProofingIssue(issueId: string)",[41,515,516,521],{},[59,517,518],{},[16,519,520],{},"ignoreProofingWord",[59,522,523],{},[16,524,525],{},"ignoreProofingWord(word: string)",[41,527,528,533],{},[59,529,530],{},[16,531,532],{},"addProofingWord",[59,534,535],{},[16,536,537],{},"addProofingWord(word: string)",[10,539,540,541,545],{},"这里只展示参数签名。接界面时见",[68,542,544],{"href":543},"\u002Fbuild\u002Fcommands","命令与控件","，正文变更继续经过同一事务与历史。",[10,547,548],{},"接入 provider 后才会检查。可选适配包为 @quirekit\u002Fproofing-harper 与 @quirekit\u002Fproofing-hunspell；二者是服务实现，不是再放进 extensions 的另一项 Core 扩展。",[25,550,551],{"id":551},"下一步",[10,553,554,555,559,560,562],{},"返回",[68,556,558],{"href":557},"\u002Fplugins","全部插件","，或阅读",[68,561,181],{"href":180},"区分配置、文档属性与命令。",[10,564,565,566,570,571,122],{},"自己定义能力时见",[68,567,569],{"href":568},"\u002Fbuild\u002Fextension","扩展开发","；搭建完整宿主时见",[68,572,574],{"href":573},"\u002Fbuild","构建产品",[576,577,578],"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":580,"depth":580,"links":581},2,[582,583,584,585,604,605],{"id":27,"depth":580,"text":27},{"id":94,"depth":580,"text":94},{"id":156,"depth":580,"text":156},{"id":174,"depth":580,"text":174,"children":586},[587,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603],{"id":185,"depth":588,"text":185},3,{"id":203,"depth":588,"text":203},{"id":219,"depth":588,"text":219},{"id":234,"depth":588,"text":235},{"id":251,"depth":588,"text":252},{"id":268,"depth":588,"text":269},{"id":284,"depth":588,"text":285},{"id":300,"depth":588,"text":301},{"id":316,"depth":588,"text":317},{"id":332,"depth":588,"text":333},{"id":348,"depth":588,"text":349},{"id":364,"depth":588,"text":365},{"id":379,"depth":588,"text":380},{"id":395,"depth":588,"text":395},{"id":411,"depth":588,"text":412},{"id":427,"depth":588,"text":428},{"id":444,"depth":580,"text":444},{"id":551,"depth":580,"text":551},"md",[171,18,608,609,185,203,219,235,252,269,285,301,317,333,349,365,380,395,412,428,472,484,496,508,520,532,171],"拼写与语法校对","behavior","zh-CN",{"navigationTitle":171,"license":23},true,126,"\u002Fplugins\u002Freference\u002Fproofing","编辑行为",{"title":5,"description":12},"plugins\u002Freference\u002Fproofing.zh-CN","t2FMiec8azyCutY1DGz7gkQgdAum7CyVPeqYmooZUo0",1793045210803]