# Setka for Drupal — 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.&#x20;

## Do Setka Editor styles affect my Drupal theme? <a href="#h_01er2fjss0kdsv31vbkyh45jqk" id="h_01er2fjss0kdsv31vbkyh45jqk"></a>

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](/help-center/content-design-system-manager.md).

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

* A [CSS reset](https://en.wikipedia.org/wiki/Reset_style_sheet). 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.

{% hint style="info" %}
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.&#x20;

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.
{% endhint %}

## **Where the content is stored**

Content stored in the Drupal database (as a regular field) in JSON format. During the displa&#x79;**,** this JSON passed to the Setka JS library to render the page as in the editor.

This JSON contains:&#x20;

1. Post's HTML (similar to regular Drupal's WYSIWYG);&#x20;
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](http://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`.&#x20;

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.

![Graphic scheme of Setka Editor integration structure](/files/-MTuYLvr8qpRUPM-yw9w)

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.

![Screenshot of Setka Editor configuration page in Drupal](/files/-MV2E5JHZPzrdtTEgSZ4)

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`

![Screenshot of Setka Editor configuration page in Drupal](/files/-MV28Z61JJoO4sspoF5X)

## **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)](https://editor-help.setka.io/hc/en-us/articles/115002594865-Setka-Post-Editor-initialization-JavaScript-#h_01EQJTNFY84BWXCKQ19B18NWBE). It would be useful if you need to reuse your media assets.\
\
We are planning to implement integration with the most popular modules soon.

\ <br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://setka.gitbook.io/help-center/integrations/setka-and-drupal/setka-for-drupal-compatibility-and-features.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
