[{"data":1,"prerenderedAt":208},["ShallowReactive",2],{"docs:\u002Fen\u002Fdocs\u002Fplugins\u002Fsearch-replace":3},{"id":4,"title":5,"body":6,"description":198,"extension":199,"meta":200,"navigation":203,"path":204,"seo":205,"stem":206,"__hash__":207},"docs_en\u002Fen\u002Fdocs\u002Fplugins\u002Fsearch-replace.md","Search and replace",{"type":7,"value":8,"toc":193},"minimark",[9,14,27,31,34,38,52,149,189],[10,11,13],"h2",{"id":12},"installation","Installation",[15,16,17,18,22,23,26],"p",{},"Factory: ",[19,20,21],"code",{},"createSearchReplacePlugin()",", id ",[19,24,25],{},"search-replace",". Requires preset pro and enabled features.plugins. Use a constructor plugins array or usePlugin on an existing editor; do not install the same id twice. In the script build the factory belongs to the ViText namespace; workspace ESM imports are shown below.",[10,28,30],{"id":29},"behavior-and-limitations","Behavior and limitations",[15,32,33],{},"Provides next match, case-sensitive and whole-word search, single replacement and replace-all. Matching uses structured text-block positions, including empty blocks\u002Ftables. Changes validate revisions and run in one history transaction; replacement remains plain text and inherits marks from the first matching character.",[10,35,37],{"id":36},"removal-and-ownership","Removal and ownership",[15,39,40,41,46,47,51],{},"usePlugin returns a disposer; removePlugin('search-replace') removes the same plugin. Destroy automatically revokes its managed commands, subscriptions and UI. The document stays intact. Application-owned requests still need application cleanup. ",[42,43,45],"a",{"href":44},"\u002Fen\u002Fdocs\u002Fplugins\u002Foverview","Plugin contract",", ",[42,48,50],{"href":49},"\u002Fen\u002Fdocs\u002Freference\u002Fmethods","methods",".",[53,54,59],"pre",{"className":55,"code":56,"language":57,"meta":58,"style":58},"language-ts shiki shiki-themes github-dark","import { ViText, createSearchReplacePlugin } from '@vitext-ru\u002Feditor';\nconst editor = new ViText('#editor', {\n  preset: 'pro', language: 'en',\n  plugins: [createSearchReplacePlugin()]\n});\n","ts","",[19,60,61,84,113,131,143],{"__ignoreMap":58},[62,63,66,70,74,77,81],"span",{"class":64,"line":65},"line",1,[62,67,69],{"class":68},"snl16","import",[62,71,73],{"class":72},"s95oV"," { ViText, createSearchReplacePlugin } ",[62,75,76],{"class":68},"from",[62,78,80],{"class":79},"sU2Wk"," '@vitext-ru\u002Feditor'",[62,82,83],{"class":72},";\n",[62,85,87,90,94,97,100,104,107,110],{"class":64,"line":86},2,[62,88,89],{"class":68},"const",[62,91,93],{"class":92},"sDLfK"," editor",[62,95,96],{"class":68}," =",[62,98,99],{"class":68}," new",[62,101,103],{"class":102},"svObZ"," ViText",[62,105,106],{"class":72},"(",[62,108,109],{"class":79},"'#editor'",[62,111,112],{"class":72},", {\n",[62,114,116,119,122,125,128],{"class":64,"line":115},3,[62,117,118],{"class":72},"  preset: ",[62,120,121],{"class":79},"'pro'",[62,123,124],{"class":72},", language: ",[62,126,127],{"class":79},"'en'",[62,129,130],{"class":72},",\n",[62,132,134,137,140],{"class":64,"line":133},4,[62,135,136],{"class":72},"  plugins: [",[62,138,139],{"class":102},"createSearchReplacePlugin",[62,141,142],{"class":72},"()]\n",[62,144,146],{"class":64,"line":145},5,[62,147,148],{"class":72},"});\n",[53,150,152],{"className":55,"code":151,"language":57,"meta":58,"style":58},"editor.usePlugin(createSearchReplacePlugin());\neditor.executePluginCommand('search-replace', 'open');\n",[19,153,154,169],{"__ignoreMap":58},[62,155,156,159,162,164,166],{"class":64,"line":65},[62,157,158],{"class":72},"editor.",[62,160,161],{"class":102},"usePlugin",[62,163,106],{"class":72},[62,165,139],{"class":102},[62,167,168],{"class":72},"());\n",[62,170,171,173,176,178,181,183,186],{"class":64,"line":86},[62,172,158],{"class":72},[62,174,175],{"class":102},"executePluginCommand",[62,177,106],{"class":72},[62,179,180],{"class":79},"'search-replace'",[62,182,46],{"class":72},[62,184,185],{"class":79},"'open'",[62,187,188],{"class":72},");\n",[190,191,192],"style",{},"html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}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);}",{"title":58,"searchDepth":86,"depth":86,"links":194},[195,196,197],{"id":12,"depth":86,"text":13},{"id":29,"depth":86,"text":30},{"id":36,"depth":86,"text":37},"Installation, behavior and limitations of the search and replace plugin.","md",{"group":201,"order":202},"Plugins",35,true,"\u002Fen\u002Fdocs\u002Fplugins\u002Fsearch-replace",{"title":5,"description":198},"en\u002Fdocs\u002Fplugins\u002Fsearch-replace","tQGjqLpm2V446VRKoa5NIKWqUoiiEnCcPiRfmdAQdXM",1792670389568]