@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix content: <http://purl.org/rss/1.0/modules/content/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<https://lhero.org/?post_type=lh-portfolio-doc&#038;p=152396>
  a sioc:Post ;
  dc:title "Architecture" ;
  dcterms:identifier 152396 ;
  dc:modified "2026-10-25T02:45:11Z"^^xsd:dateTime ;
  dc:created "2026-10-25T01:48:00Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-spreadsheets/architecture/> ;
  sioc:has_creator <https://lhero.org/author/1/#account> ;
  sioc:has_container <https://lhero.org/#posts> ;
  content:encoded "<ul class=\"lh_portfolio-meta\"><li><strong>Part of:</strong> <a href=\"https://lhero.org/portfolio/lh-spreadsheets/\">LH Spreadsheets</a></li></ul><h2 class=\"wp-block-heading\">Storage</h2><p class=\"wp-block-paragraph\">A spreadsheet is a post of type <code>lh_spreadsheet</code> (filter <code>lh_spreadsheets_return_post_type</code>). Its <code>post_content</code> is a single <code>lh-spreadsheets/sheet</code> block whose <code>workbook</code> object attribute holds the Univer workbook snapshot (<code>IWorkbookData</code>). The title is <code>post_title</code> and the description <code>post_excerpt</code>. The post type registers that block as its locked template (<code>template_lock: all</code>), so a spreadsheet always contains exactly one grid.</p><p class=\"wp-block-paragraph\">Before 2.0.0 the workbook was a JSON string in a <code>sheetData</code> attribute, which stored every double quote as a six-character unicode escape and roughly doubled the size on disk. A block deprecation migrates it to <code>workbook</code> when the post is opened, and the REST API reads both forms.</p><h2 class=\"wp-block-heading\">The editor: Univer inside the canvas iframe</h2><p class=\"wp-block-paragraph\">In the iframed block editor, block JavaScript runs in the parent admin window while the block&#8217;s DOM lives in the canvas iframe. Univer listens on, measures and portals into its own <code>window</code> and <code>document</code>, so run from the parent it renders nothing usable: menus and dropdowns land in the wrong document and its stylesheet never reaches the canvas. That was why 1.x never worked on WordPress 7.0.</p><ul class=\"wp-block-list\"><li><code>build/univer-host.js</code> bundles Univer with its own React and no WordPress externals, and exposes <code>window.LHSpreadsheets.mount( element, workbook, onChange )</code>.</li><li>It and <code>build/univer-host.css</code> are enqueued on <code>enqueue_block_assets</code>, only on the spreadsheet editor screen and only during core&#8217;s iframe pass (when <code>wp_should_load_block_editor_scripts_and_styles()</code> is false). Univer&#8217;s stylesheet has global resets that would restyle wp-admin if it reached the parent page.</li><li>The block&#8217;s edit component (<code>build/index.js</code>) is thin: it finds <code>LHSpreadsheets</code> on the iframe&#8217;s own window (waiting for the <code>lh-spreadsheets-ready</code> event if needed) and mounts the grid into its element.</li><li>Univer&#8217;s lazy chunks load on demand from <code>build/univer-host-chunks/</code>. The bundle is minified ASCII-only, so it parses whatever charset the server sends with <code>.js</code> files.</li><li>Theme styles are stripped from the spreadsheet editor canvas (<code>block_editor_settings_all</code>).</li></ul>"^^rdf:XMLLiteral ;
  sioc:content "Part of: LH SpreadsheetsStorageA spreadsheet is a post of type lh_spreadsheet (filter lh_spreadsheets_return_post_type). Its post_content is a single lh-spreadsheets/sheet block whose workbook object attribute holds the Univer workbook snapshot (IWorkbookData). The title is post_title and the description post_excerpt. The post type registers that block as its locked template (template_lock: all), so a spreadsheet always contains exactly one grid.Before 2.0.0 the workbook was a JSON string in a sheetData attribute, which stored every double quote as a six-character unicode escape and roughly doubled the size on disk. A block deprecation migrates it to workbook when the post is opened, and the REST API reads both forms.The editor: Univer inside the canvas iframeIn the iframed block editor, block JavaScript runs in the parent admin window while the block&#8217;s DOM lives in the canvas iframe. Univer listens on, measures and portals into its own window and document, so run from the parent it renders nothing usable: menus and dropdowns land in the wrong document and its stylesheet never reaches the canvas. That was why 1.x never worked on WordPress 7.0.build/univer-host.js bundles Univer with its own React and no WordPress externals, and exposes window.LHSpreadsheets.mount( element, workbook, onChange ).It and build/univer-host.css are enqueued on enqueue_block_assets, only on the spreadsheet editor screen and only during core&#8217;s iframe pass (when wp_should_load_block_editor_scripts_and_styles() is false). Univer&#8217;s stylesheet has global resets that would restyle wp-admin if it reached the parent page.The block&#8217;s edit component (build/index.js) is thin: it finds LHSpreadsheets on the iframe&#8217;s own window (waiting for the lh-spreadsheets-ready event if needed) and mounts the grid into its element.Univer&#8217;s lazy chunks load on demand from build/univer-host-chunks/. The bundle is minified ASCII-only, so it parses whatever charset the server sends with .js files.Theme styles are stripped from the spreadsheet editor canvas (block_editor_settings_all)." ;
  sioc:topic <https://lhero.org/?taxonomy=author&term=cap-1> .

<https://lhero.org/author/1/#account> rdfs:seeAlso <https://lhero.org/author/1/?feed=lhrdf&format=turtle> .
<https://lhero.org/?taxonomy=author&term=cap-1> rdfs:seeAlso <https://lhero.org/?taxonomy=author&term=cap-1&feed=lhrdf&format=turtle> .
