[{"data":1,"prerenderedAt":394},["ShallowReactive",2],{"quirekit-doc:\u002Fen\u002Fplugins\u002Freference\u002Fundo-redo":3},{"id":4,"title":5,"body":6,"description":12,"extension":382,"keywords":383,"locale":386,"meta":387,"navigation":160,"order":388,"path":389,"section":390,"seo":391,"stem":392,"__hash__":393},"docs\u002Fplugins\u002Freference\u002Fundo-redo.en.md","UndoRedo",{"type":7,"value":8,"toc":370},"minimark",[9,13,24,29,35,88,96,100,116,124,131,197,204,208,211,214,218,224,228,231,237,243,247,250,254,258,262,265,315,323,327,338,342,353,366],[10,11,12],"p",{},"Provides local document history and undo\u002Fredo. Disable it when collaboration supplies its own history.",[10,14,15,19,20],{},[16,17,18],"code",{},"@quirekit\u002Fextensions"," · ",[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,81],{},[60,77,78],{},"Block",[60,80,65],{},[60,82,83,87],{},[69,84,86],{"href":85},"\u002Fen\u002Fplugins\u002Freference\u002Fcreate-block-editor-preset","createBlockEditorPreset"," — The default createBlockEditor preset installs this capability. Configure the corresponding preset child; graphic editing uses the preset's workspace ports, while persistence and assets remain host-owned. Avoid duplicate extensions.",[10,89,90,91,95],{},"“Supported” means the product assembly above exists; interaction, host services and file formats retain their own conditions. See ",[69,92,94],{"href":93},"\u002Fen\u002Fplugins\u002Fcompatibility","status and integration rules",". Licensing is shown separately.",[25,97,99],{"id":98},"installation","Installation",[101,102,107],"pre",{"className":103,"code":104,"language":105,"meta":106,"style":106},"language-sh shiki shiki-themes github-light github-light github-dark","pnpm add @quirekit\u002Fextensions@alpha\n","sh","",[16,108,109],{"__ignoreMap":106},[110,111,114],"span",{"class":112,"line":113},"line",1,[110,115,104],{},[10,117,118,119,123],{},"Install in Editor extensions. The host supplies a view, container and persistence; see ",[69,120,122],{"href":121},"\u002Fen\u002Fguide\u002Fquick-start","Quick start",".",[10,125,126,127,130],{},"Included in StarterKit. Configure its ",[16,128,129],{},"undoRedo"," child, or disable that child before installing a replacement.",[101,132,136],{"className":133,"code":134,"language":135,"meta":106,"style":106},"language-ts shiki shiki-themes github-light github-light github-dark","import { UndoRedo } from '@quirekit\u002Fextensions'\n\nconst history = UndoRedo.configure({ depth: 200, newGroupDelay: 500 })\n","ts",[16,137,138,155,162],{"__ignoreMap":106},[110,139,140,144,148,151],{"class":112,"line":113},[110,141,143],{"class":142},"sDD9d","import",[110,145,147],{"class":146},"sVPnS"," { UndoRedo } ",[110,149,150],{"class":142},"from",[110,152,154],{"class":153},"s-HEn"," '@quirekit\u002Fextensions'\n",[110,156,158],{"class":112,"line":157},2,[110,159,161],{"emptyLinePlaceholder":160},true,"\n",[110,163,165,168,172,175,178,182,185,188,191,194],{"class":112,"line":164},3,[110,166,167],{"class":142},"const",[110,169,171],{"class":170},"sUNQB"," history",[110,173,174],{"class":142}," =",[110,176,177],{"class":146}," UndoRedo.",[110,179,181],{"class":180},"sgQzM","configure",[110,183,184],{"class":146},"({ depth: ",[110,186,187],{"class":170},"200",[110,189,190],{"class":146},", newGroupDelay: ",[110,192,193],{"class":170},"500",[110,195,196],{"class":146}," })\n",[10,198,199,200,123],{},"Use compatible versions available from your distribution source. This site uses the Alpha workspace. License labels come from package metadata; see ",[69,201,203],{"href":202},"\u002Fen\u002Fsupport","support and licensing",[25,205,207],{"id":206},"integration-by-editor","Integration by editor",[10,209,210],{},"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.",[212,213],"plugin-integration",{"name":5},[25,215,217],{"id":216},"configuration","Configuration",[10,219,220,221,123],{},"These are extension-level defaults. Presets can override them; they are distinct from current document attributes. See ",[69,222,216],{"href":223},"\u002Fen\u002Fplugins\u002Fconfiguration",[225,226,227],"h3",{"id":227},"depth",[10,229,230],{},"Maximum number of history events kept before old events are discarded.",[10,232,233,234],{},"Type：",[16,235,236],{},"number",[10,238,239,240],{},"Default：",[16,241,242],{},"100",[225,244,246],{"id":245},"newgroupdelay","newGroupDelay",[10,248,249],{},"Delay in milliseconds after which a new history group is started.",[10,251,233,252],{},[16,253,236],{},[10,255,239,256],{},[16,257,193],{},[25,259,261],{"id":260},"commands-and-runtime","Commands and runtime",[10,263,264],{},"These commands are supplied directly by this extension. Availability depends on the installed schema, selection and protection policy; query editor.can() first.",[36,266,267,277],{},[39,268,269],{},[42,270,271,274],{},[45,272,273],{},"Command",[45,275,276],{},"Parameter signature",[55,278,279,291,303],{},[42,280,281,286],{},[60,282,283],{},[16,284,285],{},"undo",[60,287,288],{},[16,289,290],{},"undo()",[42,292,293,298],{},[60,294,295],{},[16,296,297],{},"redo",[60,299,300],{},[16,301,302],{},"redo()",[42,304,305,310],{},[60,306,307],{},[16,308,309],{},"closeHistory",[60,311,312],{},[16,313,314],{},"closeHistory()",[10,316,317,318,322],{},"These are parameter signatures. See ",[69,319,321],{"href":320},"\u002Fen\u002Fbuild\u002Fcommands","commands and controls"," to connect UI while retaining one transaction\u002Fhistory authority.",[25,324,326],{"id":325},"other-public-exports","Other public exports",[328,329,330],"ul",{},[331,332,333,19,335],"li",{},[16,334,5],{},[16,336,337],{},"@quirekit\u002Fstarter-kit",[25,339,341],{"id":340},"next-steps","Next steps",[10,343,344,345,349,350,352],{},"Return to ",[69,346,348],{"href":347},"\u002Fen\u002Fplugins","all plugins",", or read ",[69,351,216],{"href":223}," to distinguish options, attributes and commands.",[10,354,355,356,360,361,365],{},"See ",[69,357,359],{"href":358},"\u002Fen\u002Fbuild\u002Fextension","extension development"," for custom capabilities and ",[69,362,364],{"href":363},"\u002Fen\u002Fbuild","Build a product"," for complete hosting.",[367,368,369],"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":106,"searchDepth":157,"depth":157,"links":371},[372,373,374,375,379,380,381],{"id":27,"depth":157,"text":28},{"id":98,"depth":157,"text":99},{"id":206,"depth":157,"text":207},{"id":216,"depth":157,"text":217,"children":376},[377,378],{"id":227,"depth":164,"text":227},{"id":245,"depth":164,"text":246},{"id":260,"depth":157,"text":261},{"id":325,"depth":157,"text":326},{"id":340,"depth":157,"text":341},"md",[5,18,384,385,227,246,285,297,309,5,5],"撤销与重做","behavior","en",{"navigationTitle":5,"license":23},143,"\u002Fen\u002Fplugins\u002Freference\u002Fundo-redo","Editing behavior",{"title":5,"description":12},"plugins\u002Freference\u002Fundo-redo.en","KGor6beLd4n4vRtrcOkl6QapGHgVPPTBc1innIoKW1w",1793045228761]