[{"data":1,"prerenderedAt":279},["ShallowReactive",2],{"quirekit-doc:\u002Fen\u002Fconcepts\u002Fdocument":3},{"id":4,"title":5,"body":6,"description":267,"extension":268,"keywords":269,"locale":270,"meta":271,"navigation":272,"order":273,"path":274,"section":275,"seo":276,"stem":277,"__hash__":278},"docs\u002Fconcepts\u002Fdocument.en.md","Documents and Schema",{"type":7,"value":8,"toc":261},"minimark",[9,13,18,149,156,162,166,169,172,176,179,183,243,257],[10,11,12],"p",{},"QuireKit stores content as a document tree. A bold “Hello” has document, paragraph and text nodes. Bold is formatting on text, rather than another paragraph.",[14,15,17],"h2",{"id":16},"nodes-marks-and-attributes","Nodes, marks and attributes",[19,20,26],"pre",{"className":21,"code":22,"filename":23,"language":24,"meta":25,"style":25},"language-json shiki shiki-themes github-light github-light github-dark","{\n  \"type\": \"doc\",\n  \"content\": [{\n    \"type\": \"paragraph\",\n    \"content\": [{\n      \"type\": \"text\",\n      \"text\": \"Hello\",\n      \"marks\": [{ \"type\": \"bold\" }]\n    }]\n  }]\n}\n","One bold paragraph","json","",[27,28,29,38,55,64,77,85,98,111,131,137,143],"code",{"__ignoreMap":25},[30,31,34],"span",{"class":32,"line":33},"line",1,[30,35,37],{"class":36},"sVPnS","{\n",[30,39,41,45,48,52],{"class":32,"line":40},2,[30,42,44],{"class":43},"sUNQB","  \"type\"",[30,46,47],{"class":36},": ",[30,49,51],{"class":50},"s-HEn","\"doc\"",[30,53,54],{"class":36},",\n",[30,56,58,61],{"class":32,"line":57},3,[30,59,60],{"class":43},"  \"content\"",[30,62,63],{"class":36},": [{\n",[30,65,67,70,72,75],{"class":32,"line":66},4,[30,68,69],{"class":43},"    \"type\"",[30,71,47],{"class":36},[30,73,74],{"class":50},"\"paragraph\"",[30,76,54],{"class":36},[30,78,80,83],{"class":32,"line":79},5,[30,81,82],{"class":43},"    \"content\"",[30,84,63],{"class":36},[30,86,88,91,93,96],{"class":32,"line":87},6,[30,89,90],{"class":43},"      \"type\"",[30,92,47],{"class":36},[30,94,95],{"class":50},"\"text\"",[30,97,54],{"class":36},[30,99,101,104,106,109],{"class":32,"line":100},7,[30,102,103],{"class":43},"      \"text\"",[30,105,47],{"class":36},[30,107,108],{"class":50},"\"Hello\"",[30,110,54],{"class":36},[30,112,114,117,120,123,125,128],{"class":32,"line":113},8,[30,115,116],{"class":43},"      \"marks\"",[30,118,119],{"class":36},": [{ ",[30,121,122],{"class":43},"\"type\"",[30,124,47],{"class":36},[30,126,127],{"class":50},"\"bold\"",[30,129,130],{"class":36}," }]\n",[30,132,134],{"class":32,"line":133},9,[30,135,136],{"class":36},"    }]\n",[30,138,140],{"class":32,"line":139},10,[30,141,142],{"class":36},"  }]\n",[30,144,146],{"class":32,"line":145},11,[30,147,148],{"class":36},"}\n",[10,150,151,152,155],{},"Nodes represent structure such as paragraphs, headings and lists. Marks represent formatting such as bold or links. Attributes (",[27,153,154],{},"attrs",") store details such as heading levels or link destinations.",[10,157,158,161],{},[27,159,160],{},"content"," contains child nodes: a list can contain list items, which contain paragraphs. This hierarchy is part of the document.",[14,163,165],{"id":164},"schema-defines-content-rules","Schema defines content rules",[10,167,168],{},"Installed Node and Mark extensions form Schema: supported nodes, allowed children, attributes and formatting. StarterKit supplies common rules for articles.",[10,170,171],{},"For new business content, define a Node and provide commands and display behavior. Drawing a box in the interface does not make it part of the saved document.",[14,173,175],{"id":174},"one-document-multiple-views","One document, multiple views",[10,177,178],{},"JSON describes content; DOM, Canvas and SVG display it. Screen coordinates and selection highlights belong to View. HTML output for a custom node does not automatically provide Canvas layout.",[14,180,182],{"id":181},"common-read-and-write-operations","Common read and write operations",[184,185,186,199],"table",{},[187,188,189],"thead",{},[190,191,192,196],"tr",{},[193,194,195],"th",{},"Task",[193,197,198],{},"Method",[200,201,202,213,223,233],"tbody",{},[190,203,204,208],{},[205,206,207],"td",{},"Save structured content",[205,209,210],{},[27,211,212],{},"editor.getJSON()",[190,214,215,218],{},[205,216,217],{},"Export HTML",[205,219,220],{},[27,221,222],{},"editor.getHTML()",[190,224,225,228],{},[205,226,227],{},"Replace ordinary content",[205,229,230],{},[27,231,232],{},"editor.commands.setContent(content)",[190,234,235,238],{},[205,236,237],{},"Restore a complete document including top-level attributes",[205,239,240],{},[27,241,242],{},"editor.commands.replaceDocument(content)",[10,244,245,246,251,252,256],{},"Load old content with compatible extensions and validate model version and Schema. Reject or migrate unknown structures while preserving the original file. See ",[247,248,250],"a",{"href":249},"\u002Fen\u002Fguide\u002Fpersistence","persistence"," and ",[247,253,255],{"href":254},"\u002Fen\u002Fbuild\u002Fmodel","article versus Word models",".",[258,259,260],"style",{},"html pre.shiki code .sVPnS, html code.shiki .sVPnS{--shiki-default:#24292E;--shiki-light:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sUNQB, html code.shiki .sUNQB{--shiki-default:#005CC5;--shiki-light:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s-HEn, html code.shiki .s-HEn{--shiki-default:#032F62;--shiki-light:#032F62;--shiki-dark:#9ECBFF}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);}",{"title":25,"searchDepth":40,"depth":40,"links":262},[263,264,265,266],{"id":16,"depth":40,"text":17},{"id":164,"depth":40,"text":165},{"id":174,"depth":40,"text":175},{"id":181,"depth":40,"text":182},"Understand nodes, marks, attributes and content rules through one bold paragraph.","md",null,"en",{},true,0,"\u002Fen\u002Fconcepts\u002Fdocument","Core concepts",{"title":5,"description":267},"concepts\u002Fdocument.en","y6JruWGteB53r1gVkBL8lRRR4WVfAo-dTLlXJQsIZfU",1793045210364]