Help Center
  • Welcome
  • Setka Editor
    • Getting started
    • Drag-and-Drop & Multiselect
    • Text editing
    • Grids and Layout
    • Images
      • Image Editor
    • Background images
    • Icons
    • Animations
    • Lists
    • Tables
    • Dividers
    • Footnotes
    • Hotspots
    • Enhance Symbols
    • Post templates
    • Buttons
    • Comments and collaboration
    • Embeds
    • Hyphenation
    • Responsive layout for mobile screens
    • Custom CSS
    • Custom JS plugins
  • Setka Content Design System Manager
    • Creating and editing styles
    • Text formats and fonts
    • Styles display for mobile mevices
    • Text and background colors
    • Dividers
    • Icons
    • Components – reusable design elements
      • Creating Components with HTML and CSS
        • CSS in components
        • Component examples
    • Configuring layout grids
    • Editing default elements with Custom CSS
    • Adding team members
  • Account Settings
    • Account settings basics
    • Access rights
    • Billing and subscription
  • Preserve your Setka Editor content after the service shutdown
  • Integrations
    • Setka and WordPress
      • Installing Setka Editor WordPress plugin
      • Launching Setka Editor on the post creation page
      • Setka Editor and WordPress compatibility
      • Setka Editor compatibility with the most popular WordPress plugins
      • Inserting graphs, charts, or diagrams into a post
      • Setka Editor and Google AMP
      • Inserting adverts into a post
      • srcset — the attribute for image size optimization
      • Page load speed optimization settings
        • Autoptimize plugin configuration
      • WordPress troubleshooting: known Issues and how to fix them
      • Preserve your Setka Editor content after the service shutdown
    • Setka and Drupal
      • Setka for Drupal — compatibility, and features
      • Installing Setka modules for Drupal
      • Setka content on AMP pages in Drupal
    • Setka and Magento
      • Installing Magento 2 extension
        • Setka Editor configuration page
      • Preserve your Setka Editor content after the service shutdown
    • Setka and HubSpot
      • Setka Editor and HubSpot Blogs
      • Setka Editor and HubSpot Landing Pages
      • Semi-gated content with a HubSpot form
      • Preserve your Setka Editor content after the service shutdown
    • Setka and Bitrix
      • Preserve your Setka Editor content after the service shutdown
    • Setka and Ghost
      • Copying and pasting posts from Setka to Ghost
    • Setka and SharePoint Online
      • Installing Setka Editor application into SharePoint Online
    • Setka and Zapier
      • Setka and Webflow
        • Exporting new posts
        • Updating exported posts
      • Setka and Shopify
    • Setka and Integromat
    • Content Cloud
  • API
    • Setka Content Cloud API
    • Webhooks
    • API for Custom CMS Integration
      • Introduction to custom integration
      • Integration with Content Design System Manager (CDSM)
        • Initial sync — receiving Setka Editor files to connect them to your CMS
        • Storing and processing Setka Editor files
        • Connecting Setka Editor files to the pages of your site
        • Receiving style updates from the Style Manager and new editor versions
      • Setka Post Editor initialization (JavaScript)
      • Integration with Style Manager (API v1, previous version)
      • Preserve your Setka Editor content after the service shutdown
    • Custom Components API
  • VIDEO TUTORIALS
    • Setka Editor Video Tutorials
  • Components Library
    • Components Library
    • Guide: Ideas for Using Setka Editor’s Components to Improve Content Design
  • Content Experience Design Best Practices
    • Guide To Designing a Great Content Experience
Powered by GitBook
On this page
  • On a post-editing page:
  • On a post preview page
  • On AMP pages

Was this helpful?

  1. API
  2. API for Custom CMS Integration
  3. Integration with Content Design System Manager (CDSM)

Connecting Setka Editor files to the pages of your site

PreviousStoring and processing Setka Editor filesNextReceiving style updates from the Style Manager and new editor versions

Last updated 4 years ago

Was this helpful?

Setka Editor files should be launched both on the post editing page (for the editor's tool operation) and on the post preview page (to connect Setka Editor styles to your content).

On a post-editing page:

  • content_editor_files — JS и CSS editor files

  • theme_files — JSON config file and a concatenated CSS file of your styles

On a post preview page

  • plugins — scripts to launch interactive post elements (animations and galleries)

  • theme_files — style files

  • concatenated CSS file for styles from theme_files (if there are 1 or 2 styles in your Style Manager) and standalone_styles (if there are many styles in your account and the common style is too large)

To use separate styles; there are 3 files from array needed:

  • common — common rules of Setka Editor styles

  • themes — a style of a specific post. Take a style ID into your account when saving it to metadata on your stack

  • layouts — layout grid used for your content. Take a layout grid ID into your account when saving it to metadata on your stack.

Public.js additional initialization parameters

By default, public.js initializes when all the content on the page is loaded. However, there may be times when you need to initialize public.js without waiting for all the content to load.

To initialize public.js on the DOMContentLoaded event, add configuration parameters with the startEvent key to the post's HTML code before the element that includes public.js.

Possible values are load (default) and DOMContentLoaded. Sample code:

<script>
      window.SEPublicConfig = {
        startEvent: 'DOMContentLoaded',
      };
</script> 

A choice of the page scrolling container

If a page scrolling container is not a window but some other DOM-element, send the following parameter to initialization:

window.SEPublicConfig = {
  $scrollingElement: document.querySelector(‘.scrollable-area’)
};

Where .scrollable-area is a container where page scrolling occurs.

Enabling polyfills

To enable custom polyfills, pass this parameter into the initialization:

window.SEPublicConfig = {
  polyfillsPath: 'https://ceditor.setka.io/editor-polyfill/polyfills.pylyfillid.min.js'
};

Where polyfillsPath is an absolute polyfill URL.

On AMP pages

  • common — common rules of AMP page styles

  • themes — a style of a specific post. Take a style ID into account when saving it to metadata on your stack

  • layouts — layout grid used for your content. Take a grid ID into account when saving it to metadata on your stack

To optimize the size of the public.js file, since version 2.11.21, we don't include a polyfill for and into it by default. If the visitor's browser does not support any of these APIs, public.js will automatically load the polyfill from Setka CDN before initialization.

AMP does not allow connecting separate style files to pages. To do that, you need to save files' content and connect it to .

There are 3 files from the array of files that need to be saved:

standalone_styles
ResizeObserver
Web Animations API
common files of AMP page styles
amp-styles