[{"data":1,"prerenderedAt":401},["ShallowReactive",2],{"quirekit-doc:\u002Fen\u002Fplugins\u002Freference\u002Fhighlight":3},{"id":4,"title":5,"body":6,"description":12,"extension":389,"keywords":390,"locale":393,"meta":394,"navigation":150,"order":395,"path":396,"section":397,"seo":398,"stem":399,"__hash__":400},"docs\u002Fplugins\u002Freference\u002Fhighlight.en.md","Highlight",{"type":7,"value":8,"toc":378},"minimark",[9,13,24,29,35,85,93,97,113,121,181,188,192,195,198,202,208,213,216,222,228,232,235,240,245,249,252,338,346,350,361,374],[10,11,12],"p",{},"Adds semantic text highlighting. defaultColor applies to newly created highlights without an explicit color.",[10,14,15,19,20],{},[16,17,18],"code",{},"@quirekit\u002Fextension-text-style"," · ",[21,22,23],"strong",{},"MIT",[25,26,28],"h2",{"id":27},"editor-compatibility","Editor compatibility",[10,30,31,32],{},"Layer：",[21,33,34],{},"Shared document capability",[36,37,38,54],"table",{},[39,40,41],"thead",{},[42,43,44,48,51],"tr",{},[45,46,47],"th",{},"Editor",[45,49,50],{},"Status",[45,52,53],{},"Assembly and boundaries",[55,56,57,74],"tbody",{},[42,58,59,63,66],{},[60,61,62],"td",{},"Classic",[60,64,65],{},"Supported",[60,67,68,73],{},[69,70,72],"a",{"href":71},"\u002Fen\u002Fplugins\u002Freference\u002Fclassic-editor-preset","classicEditorPreset"," — Use the product-neutral classicEditorPreset without duplicating installed capabilities. The Word preset replaces paragraphs, headings and container lists; do not stack generic structures onto that model.",[42,75,76,79,82],{},[60,77,78],{},"Block",[60,80,81],{},"Requires integration",[60,83,84],{},"Connect the services, targets and lifecycle described on this page and validate the selected View and document model. Core contracts are reusable, but there is no universal product installation without host ports.",[10,86,87,88,92],{},"“Supported” means the product assembly above exists; interaction, host services and file formats retain their own conditions. See ",[69,89,91],{"href":90},"\u002Fen\u002Fplugins\u002Fcompatibility","status and integration rules",". Licensing is shown separately.",[25,94,96],{"id":95},"installation","Installation",[98,99,104],"pre",{"className":100,"code":101,"language":102,"meta":103,"style":103},"language-sh shiki shiki-themes github-light github-light github-dark","pnpm add @quirekit\u002Fextension-text-style@alpha\n","sh","",[16,105,106],{"__ignoreMap":103},[107,108,111],"span",{"class":109,"line":110},"line",1,[107,112,101],{},[10,114,115,116,120],{},"Install in Editor extensions. The host supplies a view, container and persistence; see ",[69,117,119],{"href":118},"\u002Fen\u002Fguide\u002Fquick-start","Quick start",".",[98,122,126],{"className":123,"code":124,"language":125,"meta":103,"style":103},"language-ts shiki shiki-themes github-light github-light github-dark","import { Highlight } from '@quirekit\u002Fextension-text-style'\n\nconst highlighter = Highlight.configure({ defaultColor: 'yellow' })\n","ts",[16,127,128,145,152],{"__ignoreMap":103},[107,129,130,134,138,141],{"class":109,"line":110},[107,131,133],{"class":132},"sDD9d","import",[107,135,137],{"class":136},"sVPnS"," { Highlight } ",[107,139,140],{"class":132},"from",[107,142,144],{"class":143},"s-HEn"," '@quirekit\u002Fextension-text-style'\n",[107,146,148],{"class":109,"line":147},2,[107,149,151],{"emptyLinePlaceholder":150},true,"\n",[107,153,155,158,162,165,168,172,175,178],{"class":109,"line":154},3,[107,156,157],{"class":132},"const",[107,159,161],{"class":160},"sUNQB"," highlighter",[107,163,164],{"class":132}," =",[107,166,167],{"class":136}," Highlight.",[107,169,171],{"class":170},"sgQzM","configure",[107,173,174],{"class":136},"({ defaultColor: ",[107,176,177],{"class":143},"'yellow'",[107,179,180],{"class":136}," })\n",[10,182,183,184,120],{},"Use compatible versions available from your distribution source. This site uses the Alpha workspace. License labels come from package metadata; see ",[69,185,187],{"href":186},"\u002Fen\u002Fsupport","support and licensing",[25,189,191],{"id":190},"integration-by-editor","Integration by editor",[10,193,194],{},"These snippets use an existing host element named element. The host owns container sizing and persistence; call instance.destroy() on teardown. Avoid duplicating preset capabilities and supply required host ports before installation.",[196,197],"plugin-integration",{"name":5},[25,199,201],{"id":200},"configuration","Configuration",[10,203,204,205,120],{},"These are extension-level defaults. Presets can override them; they are distinct from current document attributes. See ",[69,206,200],{"href":207},"\u002Fen\u002Fplugins\u002Fconfiguration",[209,210,212],"h3",{"id":211},"htmlattributes","HTMLAttributes",[10,214,215],{},"HTML attributes added when the highlight mark serializes to HTML.",[10,217,218,219],{},"Type：",[16,220,221],{},"Record\u003Cstring, unknown>",[10,223,224,225],{},"Default：",[16,226,227],{},"{}",[209,229,231],{"id":230},"defaultcolor","defaultColor",[10,233,234],{},"Highlight token applied when a new mark does not specify one.",[10,236,218,237],{},[16,238,239],{},"string",[10,241,224,242],{},[16,243,244],{},"\"yellow\"",[25,246,248],{"id":247},"commands-and-runtime","Commands and runtime",[10,250,251],{},"These commands are supplied directly by this extension. Availability depends on the installed schema, selection and protection policy; query editor.can() first.",[36,253,254,264],{},[39,255,256],{},[42,257,258,261],{},[45,259,260],{},"Command",[45,262,263],{},"Parameter signature",[55,265,266,278,290,302,314,326],{},[42,267,268,273],{},[60,269,270],{},[16,271,272],{},"setHighlight",[60,274,275],{},[16,276,277],{},"setHighlight(attributes?: HighlightAttributes | undefined)",[42,279,280,285],{},[60,281,282],{},[16,283,284],{},"toggleHighlight",[60,286,287],{},[16,288,289],{},"toggleHighlight(attributes?: HighlightAttributes | undefined)",[42,291,292,297],{},[60,293,294],{},[16,295,296],{},"unsetHighlight",[60,298,299],{},[16,300,301],{},"unsetHighlight()",[42,303,304,309],{},[60,305,306],{},[16,307,308],{},"startHighlighterPen",[60,310,311],{},[16,312,313],{},"startHighlighterPen(color: string | null)",[42,315,316,321],{},[60,317,318],{},[16,319,320],{},"stopHighlighterPen",[60,322,323],{},[16,324,325],{},"stopHighlighterPen()",[42,327,328,333],{},[60,329,330],{},[16,331,332],{},"applyHighlighterPen",[60,334,335],{},[16,336,337],{},"applyHighlighterPen()",[10,339,340,341,345],{},"These are parameter signatures. See ",[69,342,344],{"href":343},"\u002Fen\u002Fbuild\u002Fcommands","commands and controls"," to connect UI while retaining one transaction\u002Fhistory authority.",[25,347,349],{"id":348},"next-steps","Next steps",[10,351,352,353,357,358,360],{},"Return to ",[69,354,356],{"href":355},"\u002Fen\u002Fplugins","all plugins",", or read ",[69,359,200],{"href":207}," to distinguish options, attributes and commands.",[10,362,363,364,368,369,373],{},"See ",[69,365,367],{"href":366},"\u002Fen\u002Fbuild\u002Fextension","extension development"," for custom capabilities and ",[69,370,372],{"href":371},"\u002Fen\u002Fbuild","Build a product"," for complete hosting.",[375,376,377],"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}html pre.shiki code .sUNQB, html code.shiki .sUNQB{--shiki-default:#005CC5;--shiki-light:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sgQzM, html code.shiki .sgQzM{--shiki-default:#6F42C1;--shiki-light:#6F42C1;--shiki-dark:#B392F0}",{"title":103,"searchDepth":147,"depth":147,"links":379},[380,381,382,383,387,388],{"id":27,"depth":147,"text":28},{"id":95,"depth":147,"text":96},{"id":190,"depth":147,"text":191},{"id":200,"depth":147,"text":201,"children":384},[385,386],{"id":211,"depth":154,"text":212},{"id":230,"depth":154,"text":231},{"id":247,"depth":147,"text":248},{"id":348,"depth":147,"text":349},"md",[5,18,391,392,212,231,272,284,296,308,320,332,5],"文字高亮","marks","en",{"navigationTitle":5,"license":23},106,"\u002Fen\u002Fplugins\u002Freference\u002Fhighlight","Marks and text styles",{"title":5,"description":12},"plugins\u002Freference\u002Fhighlight.en","0fjUpI07SSbwo0oUMx-s2Btv14BafZqVLNJvwKBqbw0",1793045227263]