How to use the @lrnwebcomponents/haxcms-elements/lib/core/haxcms-site-store.js.store.activeItemContent function in @lrnwebcomponents/haxcms-elements

To help you get started, we’ve selected a few @lrnwebcomponents/haxcms-elements examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github elmsln / lrnwebcomponents / elements / haxcms-elements / lib / core / HAXCMSThemeWiring.js View on Github external
setTimeout(() => {
        if (this.childNodes.length === 0) {
          let frag = document
            .createRange()
            .createContextualFragment(store.activeItemContent);
          this.appendChild(frag);
        }
        this.__styleReapply();
      }, 50);
      // keep editMode in sync globally
github elmsln / lrnwebcomponents / elements / haxcms-elements / lib / ui-components / site / site-print-button.js View on Github external
async print(e) {
    // now dynamic import the footer so we don't bloat all other page loads
    import("@lrnwebcomponents/haxcms-elements/lib/ui-components/layout/site-footer.js");
    const type = this.type;
    let content = "";
    if (type === "page") {
      // oh there you are
      content = `
      <h1>${store.activeItem.title}</h1>
      <div>${store.activeItemContent}</div>`;
    } else if (type === "parent") {
      // everything from the parent of this page, down
      const result = store.computeItems(
        1,
        100,
        store.activeId,
        "parent",
        store.routerManifest,
        true
      );
      for (var i in result) {
        content += await fetch("pages/" + result[i].location + "/index.html")
          .then(function(response) {
            return response.text();
          })
          .then(function(response) {

@lrnwebcomponents/haxcms-elements

HAX CMS series of elements to provide a full on CMS

Apache-2.0
Latest version published 5 months ago

Package Health Score

69 / 100
Full package analysis

Popular @lrnwebcomponents/haxcms-elements functions