# Introduction to custom integration

## What is Setka Editor?

Please learn about Setka Editor and Setka Content Experience Design Manager:&#x20;

{% content-ref url="../../setka-post-editor" %}
[setka-post-editor](../../setka-post-editor)
{% endcontent-ref %}

{% content-ref url="../../content-design-system-manager" %}
[content-design-system-manager](../../content-design-system-manager)
{% endcontent-ref %}

## Setka Editor integration <a href="#h_c653fc99-cb68-45ec-a3d6-9a65ca1c9c7d" id="h_c653fc99-cb68-45ec-a3d6-9a65ca1c9c7d"></a>

Integration of Setka Editor and a CMS comes in 2 stages:

1. Style Manager integration — to update styles from the Style Manager account and the editor itself.
2. Editor initialization on a CMS' post editor page.

### How to register and configure the account <a href="#h_bd4d50f5-23af-442e-a6e5-eff004b44785" id="h_bd4d50f5-23af-442e-a6e5-eff004b44785"></a>

To start the integration, it is necessary to create an account (if you don't have one). After the registration, go to the **CMS Integration** tab on [editor.setka.io](https://editor.setka.io/login) and select **Add your domain** in the **Set your domain** block. Then select **Via API** as an integration type.

### What is necessary for the integration <a href="#h_3e3dbe26-2acd-4742-baba-cf902c180086" id="h_3e3dbe26-2acd-4742-baba-cf902c180086"></a>

1. **Fill in the license key**. It is located in your [Setka Account](https://editor.setka.io), on the **Integrations** tab. It is unnecessary to create a text field in your CMS interface; you can add it to the code. The license key is being transferred with your GET-requests.&#x20;
2. Fill in the **Editor config URL** in the **CMS Integration** **>** **Other** tab.

**Editor config URL** is an address on which you will receive a recent version of the editor and style updates, created in the Style Manager, to your CMS. On initial sync, you will also receive a `public_token`, which is required for several editor functions to work, e.g., for commenting and inserting embeds via URL.&#x20;

{% hint style="warning" %}
The link should be specified with a protocol (HTTP/HTTPS) for the correct integration.
{% endhint %}

![Screenshot of Setka Editor Cloud interface. CMS Integration tab  with "Other" option and Editor config URL added](https://1843290185-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MLOEPbfEK4119w2ROYc%2F-MRpcs3xKzvDDIVCiN3u%2F-MRpeG2tbUY6cMjRLBaY%2FScreenshot%20of%20Setka%20Editor%20Cloud%20interface%20CMS%20Integration%20Tab%20Other.png?alt=media\&token=2b63f0de-d88e-4e6c-92a6-62a9e193a562)

{% hint style="warning" %}
It is not possible to specify a local server (localhost, 127.0.0.1). Public IP-address on DNS servers should match the domain. Set up a tunnel with an external address if you want to test an interaction with a local server, e.g., with the [localtunnel](https://www.npmjs.com/package/localtunnel) service.&#x20;
{% endhint %}

## Glossary <a href="#h_1fc88e2a-aa90-48f5-a54c-bd1118e81364" id="h_1fc88e2a-aa90-48f5-a54c-bd1118e81364"></a>

**Company** — a Setka client, each company with a website with a license key and an account in the Style Manager.

**License key** — company's unique ID, used to connect client websites with the Style Manager.

**Public key (public token)** — a public ID used to send auxiliary requests from the editor to the Style Manager. You can receive it in response to initial synchronization. The public key must be handled to [editor initialization](https://editor-help.setka.io/hc/en-us/articles/115002594865).

[**Style Manager**](../../content-design-system-manager) **(located at editor.setka.io):**

1. A company account.
2. An interface for creating and editing styles (fonts, text formats, color palettes, etc.) and layout grids (column parameters, indentations, and margins).
3. An API for an automatic connection between the client website and Setka Editor.

**Editor** — Setka JavaScript WYSIWYG Editor. Launches only in the admin panel. It consists of 2 files in the form of:

**editor.min.js** — editor's main JS file (hereinafter – `editor.js`).

**editor.min.css** — main CSS file, contains editor's interface styles (hereinafter — `editor.css`).

**Post —** HTML-code of the post, wrapped into`<div class=“stk-post”>...</div>`.

**Style** — set of CSS rules for text styles, fonts, colors, dividers, etc., defines a corporate identity. Being edited in the Style Manager.

**Grid** — set of CSS rules for building modular grids with columns and indents, used in post layouts and mobile versions. Being edited in the Style Manager.

Styles and grids can be built-in or custom. They are being created in Style Manager. Style Manager generates a new pair of files on each change:&#x20;

**company.min.css** — CSS rules for all the company's styles and grids (hereinafter — `company.css`).

**company.json** — JSON metadata of styles, grids, etc. (hereinafter — `company.json`).

**public.js** — JS file with scripts to launch interactive elements of a post (animations and galleries). Activates on external post pages only.

## FAQ <a href="#h_2dc3481d-e1cf-4eb0-ba19-df3ac54ed56f" id="h_2dc3481d-e1cf-4eb0-ba19-df3ac54ed56f"></a>

### Is Setka Editor compatible with my CMS? <a href="#h_e9ed7b0b-36a0-4996-8cb0-85e29a07a50e" id="h_e9ed7b0b-36a0-4996-8cb0-85e29a07a50e"></a>

Setka Editor is currently available on WordPress, [Drupal](../../integrations/setka-and-drupal), [Magento](../../integrations/setka-editor-and-magento), [Microsoft SharePoint Online](../../integrations/setka-and-sharepoint-online),  [HubSpot](../../integrations/setka-and-hubspot/setka-and-hubspot-blogs), and [Ghost](../../integrations/setka-and-ghost). Setka also offers integrations with [Shopify](../../integrations/setka-and-zapier/setka-editor-posts-export-to-shopify) and [Webflow](../../integrations/setka-and-zapier/setka-and-webflow) via [Zapier](../../integrations/setka-and-zapier). On top of that, Setka Editor can be integrated with any platform, such as Joomla, MOD X, Typo3, or your own-written proprietary CMS or eCommerce platform.

### Does Setka Editor code meet the requirements of SEO? <a href="#h_b9d10cb4-2c7a-4d63-b778-bb28cb0ac7e6" id="h_b9d10cb4-2c7a-4d63-b778-bb28cb0ac7e6"></a>

Setka Editor generates well-structured code that meets the requirements of SEO. In the development of Setka Editor, we pay a lot of attention to semantics and correct code structure following the HTML5 standard. Setka Editor edits the page content only; thus, it generates the code with a less nesting level, unlike tools that generate the entire page (page builders). Less-nested HTML code allows faster page loading. Setka Editor also correctly tags headers and allows filling-in an alternate text for images.&#x20;

### How Setka Editor exports the content? <a href="#h_104d5edd-d7a7-45e0-8aaa-0ede943f9251" id="h_104d5edd-d7a7-45e0-8aaa-0ede943f9251"></a>

Setka Editor uses its' own tree data structure. Each layout element (paragraph, image, grid, etc.) is presented as an object with properties and connections to other elements. It allows to stay unattached to the HTML representation of a document and export the content in any required format, e.g., JSON.

### Where and how my content is stored? <a href="#h_6a6d941d-bbbd-46e3-9cc1-5fbda09dbb80" id="h_6a6d941d-bbbd-46e3-9cc1-5fbda09dbb80"></a>

All the content is stored as HTML-code in our database. CSS files can be stored on the client-side or delivered via Setka Editor CDN.

## Useful links <a href="#h_7db0d297-11e5-4d37-904b-db077cbb5098" id="h_7db0d297-11e5-4d37-904b-db077cbb5098"></a>

* [The latest version of the API documentation](https://editor.setka.io/docs/api2/index.html)
* [Integration sample for Ruby on Rails](https://github.com/setkaio/grid-editor-integration)

## Continue the custom integration: <a href="#h_db613d62-7f8b-4033-8013-af0f2f891173" id="h_db613d62-7f8b-4033-8013-af0f2f891173"></a>

* [Integration with Style Manager](integration-with-style-manager-api-v1-previous-version)
* [Setka Post Editor initialization (JavaScript)](setka-post-editor-initialization-javascript)
