[{"data":1,"prerenderedAt":321},["ShallowReactive",2],{"docs:\u002Fen\u002Fdocs\u002Finstallation\u002Fscript":3},{"id":4,"title":5,"body":6,"description":312,"extension":313,"meta":314,"navigation":316,"path":317,"seo":318,"stem":319,"__hash__":320},"docs_en\u002Fen\u002Fdocs\u002Finstallation\u002Fscript.md","JavaScript editor via script",{"type":7,"value":8,"toc":306},"minimark",[9,18,30,35,38,42,49,53,56,60,73,240,302],[10,11,12,13,17],"p",{},"Script integration adds a visual content editor to a plain HTML page without a bundler or UI framework. After editing, call ",[14,15,16],"code",{},"editor.getHTML()"," to export HTML for your application.",[10,19,20,25,26,29],{},[21,22,24],"a",{"href":23},"\u002Fdownloads\u002Fvitext-community-1.0.0-beta.6.zip","Download the Community browser archive",", extract it and copy the entire ",[14,27,28],{},"vitext\u002F"," folder into your static assets. No GitHub access or bundler is required. Keep all four browser files together and preserve LICENSE and THIRD_PARTY_NOTICES.md. The archive includes a working example and RU\u002FEN guides.",[31,32,34],"h2",{"id":33},"deploy-the-complete-distribution","Deploy the complete distribution",[10,36,37],{},"Copy the archive's vitext\u002F folder into your application's static assets. Keep vitext.iife.js, vitext.css, source.js, codecs.js, dependency chunks and license notices together. Serve the files over HTTP; opening a file URL is not equivalent.",[31,39,41],{"id":40},"create-an-instance","Create an instance",[10,43,44,45,48],{},"Include the stylesheet, add a target element and load vitext.iife.js before constructing ",[14,46,47],{},"new ViText.ViText(...)",". Factories such as ViText.createWordCountPlugin belong to the same script namespace. This is a local build, not a published CDN or npm release.",[31,50,52],{"id":51},"lazy-loading","Lazy loading",[10,54,55],{},"HTML\u002FCSS editing and conversion engines load when needed. Custom sourceModuleURL\u002FcodecsModuleURL values must point to trusted files from the same build. Do not update only the main JavaScript file. Await whenReady for initial Markdown\u002FCSS and whenSourceReady for source UI.",[31,57,59],{"id":58},"remove-the-instance","Remove the instance",[10,61,62,63,67,68,72],{},"Call destroy before removing or reusing the target. Release application-owned network requests and subscriptions too. ",[21,64,66],{"href":65},"\u002Fen\u002Fdocs\u002Finstallation\u002Fesm","ESM",", ",[21,69,71],{"href":70},"\u002Fen\u002Fdocs\u002Fguides\u002Flifecycle","lifecycle",".",[74,75,80],"pre",{"className":76,"code":77,"language":78,"meta":79,"style":79},"language-html shiki shiki-themes github-dark","\u003Clink rel=\"stylesheet\" href=\"\u002Fvitext\u002Fvitext.css\">\n\u003Cdiv id=\"editor\">\u003C\u002Fdiv>\n\u003Cscript src=\"\u002Fvitext\u002Fvitext.iife.js\">\u003C\u002Fscript>\n\u003Cscript>\n  const editor = new ViText.ViText('#editor', {\n    preset: 'base', language: 'en', content: '\u003Cp>Hello!\u003C\u002Fp>'\n  });\n\u003C\u002Fscript>\n","html","",[14,81,82,117,140,162,171,203,224,230],{"__ignoreMap":79},[83,84,87,91,95,99,102,106,109,111,114],"span",{"class":85,"line":86},"line",1,[83,88,90],{"class":89},"s95oV","\u003C",[83,92,94],{"class":93},"s4JwU","link",[83,96,98],{"class":97},"svObZ"," rel",[83,100,101],{"class":89},"=",[83,103,105],{"class":104},"sU2Wk","\"stylesheet\"",[83,107,108],{"class":97}," href",[83,110,101],{"class":89},[83,112,113],{"class":104},"\"\u002Fvitext\u002Fvitext.css\"",[83,115,116],{"class":89},">\n",[83,118,120,122,125,128,130,133,136,138],{"class":85,"line":119},2,[83,121,90],{"class":89},[83,123,124],{"class":93},"div",[83,126,127],{"class":97}," id",[83,129,101],{"class":89},[83,131,132],{"class":104},"\"editor\"",[83,134,135],{"class":89},">\u003C\u002F",[83,137,124],{"class":93},[83,139,116],{"class":89},[83,141,143,145,148,151,153,156,158,160],{"class":85,"line":142},3,[83,144,90],{"class":89},[83,146,147],{"class":93},"script",[83,149,150],{"class":97}," src",[83,152,101],{"class":89},[83,154,155],{"class":104},"\"\u002Fvitext\u002Fvitext.iife.js\"",[83,157,135],{"class":89},[83,159,147],{"class":93},[83,161,116],{"class":89},[83,163,165,167,169],{"class":85,"line":164},4,[83,166,90],{"class":89},[83,168,147],{"class":93},[83,170,116],{"class":89},[83,172,174,178,182,185,188,191,194,197,200],{"class":85,"line":173},5,[83,175,177],{"class":176},"snl16","  const",[83,179,181],{"class":180},"sDLfK"," editor",[83,183,184],{"class":176}," =",[83,186,187],{"class":176}," new",[83,189,190],{"class":89}," ViText.",[83,192,193],{"class":97},"ViText",[83,195,196],{"class":89},"(",[83,198,199],{"class":104},"'#editor'",[83,201,202],{"class":89},", {\n",[83,204,206,209,212,215,218,221],{"class":85,"line":205},6,[83,207,208],{"class":89},"    preset: ",[83,210,211],{"class":104},"'base'",[83,213,214],{"class":89},", language: ",[83,216,217],{"class":104},"'en'",[83,219,220],{"class":89},", content: ",[83,222,223],{"class":104},"'\u003Cp>Hello!\u003C\u002Fp>'\n",[83,225,227],{"class":85,"line":226},7,[83,228,229],{"class":89},"  });\n",[83,231,233,236,238],{"class":85,"line":232},8,[83,234,235],{"class":89},"\u003C\u002F",[83,237,147],{"class":93},[83,239,116],{"class":89},[74,241,245],{"className":242,"code":243,"language":244,"meta":79,"style":79},"language-js shiki shiki-themes github-dark","const editor = new ViText.ViText('#editor', {\n  sourceModuleURL: '\u002Fassets\u002Feditor\u002Fsource.js',\n  codecsModuleURL: '\u002Fassets\u002Feditor\u002Fcodecs.js',\n  content: '\u003Cp>Документ\u003C\u002Fp>'\n});\n","js",[14,246,247,268,279,289,297],{"__ignoreMap":79},[83,248,249,252,254,256,258,260,262,264,266],{"class":85,"line":86},[83,250,251],{"class":176},"const",[83,253,181],{"class":180},[83,255,184],{"class":176},[83,257,187],{"class":176},[83,259,190],{"class":89},[83,261,193],{"class":97},[83,263,196],{"class":89},[83,265,199],{"class":104},[83,267,202],{"class":89},[83,269,270,273,276],{"class":85,"line":119},[83,271,272],{"class":89},"  sourceModuleURL: ",[83,274,275],{"class":104},"'\u002Fassets\u002Feditor\u002Fsource.js'",[83,277,278],{"class":89},",\n",[83,280,281,284,287],{"class":85,"line":142},[83,282,283],{"class":89},"  codecsModuleURL: ",[83,285,286],{"class":104},"'\u002Fassets\u002Feditor\u002Fcodecs.js'",[83,288,278],{"class":89},[83,290,291,294],{"class":85,"line":164},[83,292,293],{"class":89},"  content: ",[83,295,296],{"class":104},"'\u003Cp>Документ\u003C\u002Fp>'\n",[83,298,299],{"class":85,"line":173},[83,300,301],{"class":89},"});\n",[303,304,305],"style",{},"html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .s4JwU, html code.shiki .s4JwU{--shiki-default:#85E89D}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}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":79,"searchDepth":119,"depth":119,"links":307},[308,309,310,311],{"id":33,"depth":119,"text":34},{"id":40,"depth":119,"text":41},{"id":51,"depth":119,"text":52},{"id":58,"depth":119,"text":59},"Embed the ViText WYSIWYG editor in an HTML page — ready-to-use JavaScript, styles, lazy HTML\u002FCSS and Markdown modules, and cleanup.","md",{"group":315,"order":119},"Getting started",true,"\u002Fen\u002Fdocs\u002Finstallation\u002Fscript",{"title":5,"description":312},"en\u002Fdocs\u002Finstallation\u002Fscript","ougvKVnxhssxJ8DGdclV3Hl3Hk5PMDiAQwIIHg-Gwlc",1792670389526]