Setka for Drupal — compatibility, and features

All about Setka Drupal module compatibility and features.

Setka Editor for Drupal — compatibility, and features

This article is intended to answer your questions about Setka Editor's technical qualities and compatibility features that are specific to Drupal CMS.

How Setka Module hooks up with Drupal

Setka integration module provides an input widget and a formatter to hook into Drupal form API and render API.

Do Setka Editor styles affect my Drupal theme?

Setka Editor styles are independent of any styles of your Drupal theme, so they do not influence each other.

How do Setka Editor styles work?

Each theme has its own CSS settings with CSS classes in it. Setka Editor partially overwrites theme settings using CSS reset, in order to allow you to use custom styles, created in Content Design System Manager.

Styles of most elements of a Setka Editor post consist of two main blocks:

  • A CSS reset. To reset most properties to the initial values.

  • Properties themselves, which are required to properly display these elements (font, color, size, etc. in accordance with your style).

These styles apply to the elements within a Setka post only. They are quite specific, thereby ensuring that there are no conflicts with the styles of the platform and that Setka posts are displayed consistently regardless of what is around them and the CMS.

A Drupal theme may also determine the width available for your post. It may also be adaptive and have no fixed width. This influences the final appearance of the post for each reader, depending on the width of their screen.

In order to check the layout of the post at various screen widths, click the View post button in the top left corner of Setka Editor.

Where the content is stored

Content stored in the Drupal database (as a regular field) in JSON format. During the display, this JSON passed to the Setka JS library to render the page as in the editor.

This JSON contains:

  1. Post's HTML (similar to regular Drupal's WYSIWYG);

  2. Metadata needed for Setka Editor to convert particular contents to a well-looking article or a landing page (e.g. specific layout settings: post id, postTheme id, postGrid id).

You can use Setka Editor for any text field you want, but take a note for now that it is possible to use only one Setka Editor Widget on the page.

Integration

Setka Editor files launched both on the post editing page (for the operation of the editor tool), and on the post preview page (to connect Setka Editor styles to user’s content).

Setka Editor files on the post-editing page:

  • content_editor_files — JS и CSS editor files (WYSIWYG interface of Setka Editor).

  • theme_files — JSON config file and a concatenated CSS file of user’s styles.

Setka Editor files on a post preview page

  • pulbic.js — scripts to launch interactive post elements (animations, footnotes, galleries, etc.)

  • style files — there are several ways to turn post styles on the post preview page

All the changes in styles and layout grids are automatically sent via webhook push events to the user’s domain.

In order to get these changes to be reflected in Drupal, the user needs to receive updates from editor.setka.io.

Setka Editor will address a URL, specified in the Editor Webhooks Endpoint field on the CMS Integration page (e.g., yourdomain.com/setka_editor_config) with the following request: POST yourdomain.com/setka_editor_config.

For Drupal, the user will only need to specify a domain that will be used to run Setka Editor and makeup posts. Once a Style Manager style is updated, the posts where these styles were used change to reflect the changes made to the style. However, the changes cannot be applied instantly. The delay depends on the cache update settings on the client-server. Adding new elements does not cause changes to old posts.

To switch files storage from your local server to Setka CDN go to admin/config/content/setka-editor and click on the checkbox next to the Use files from Setka CDN option.

A Type of integration option allows you to choose a type of files that you connect to your post. In case you choose Default, only standalone styles will be loaded, a Legacy option loads combined CSS file for your Setka Editor posts. You can activate it at /admin/config/content/setka-editor

Media Library

Currently, Setka Editor is not compatible with the Media Library module or other modules for storing media asset files out of the box. This means that you can only download media assets from your computer. Setka Editor has an API for connecting to any custom media library (DAM). It would be useful if you need to reuse your media assets. We are planning to implement integration with the most popular modules soon.

Last updated