Connecting Setka Editor files to the pages of your site
Last updated
Was this helpful?
Last updated
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).
content_editor_files
— JS и CSS editor files
theme_files
— JSON config file and a concatenated CSS file of your styles
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)
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:
If a page scrolling container is not a window
but some other DOM-element, send the following parameter to initialization:
Where .scrollable-area is a container where page scrolling occurs.
To enable custom polyfills, pass this parameter into the initialization:
Where polyfillsPath
is an absolute polyfill URL.
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: