Initial sync — receiving Setka Editor files to connect them to your CMS

To get style and editor files configured in your account, make the following request with your license key:

GET https://editor.setka.io/api/v2/integration?token=your-license-key

Response sample:

{
  "public_token": "123456789123456789123456789",
  "plugins": [
    {
      "url": "https://ceditor.setka.io/public.v.1.2.3.js",
      "filetype": "js",
      "md5": "asdfasdfasdf"
    }
  ],
  "content_editor_files": [
    {
      "id": 1,
      "url": "https://ceditor.setka.io/company.v.1.2.3.min.css",
      "filetype": "css",
      "md5": "asdfasdfasdf"
    },
    {
      "id": 1,
      "url": "https://ceditor.setka.io/company.v.1.2.3.min.js",
      "filetype": "js",
      "md5": "asdfasdfasdf"
    }
  ],
  "theme_files": [
    {
      "id": 1,
      "url": "https://ceditor.setka.io/company.v.1.2.3.min.css",
      "filetype": "css",
      "md5": "asdfasdfasdf"
    },
    {
      "id": 1,
      "url": "https://ceditor.setka.io/public.v.1.2.3.json",
      "filetype": "json",
      "md5": "asdfasdfasdf"
    }
  ],
  "standalone_styles": {
    "common": [
      {
        "id": 1,
        "url": "https://ceditor.setka.io/common_css/common_css_1.css",
        "filetype": "css"
      }
    ],
    "themes": [
      {
        "id": "1",
        "url": "https://ceditor.setka.io/clients/company/css/1.css",
        "filetype": "css"
      }
    ],
    "layouts": [
      {
        "id": "1",
        "url": "https://ceditor.setka.io/clients/company/layout_option_builds/1/1.css",
        "filetype": "css"
      }
    ]
  }
}

Description for the received set of files:

File

URL

Description

public_token

The Public key (public_token) — a public ID of the company, used to send auxiliary requests from the editor to the Style Manager. You can receive it in response to the initial synchronization or copy it from your CMS Integration page. The public key needs to be handled to editor initialization.

plugins

https://ceditor.setka.io

/public.v.1.2.3.js

Scripts to launch interactive elements of a post (animations and galleries)

An array of files for the editor

An array of files responsible for posts display. Includes a general style file and an editor config file

An array of CSS files and rules for all the styles and grids of a company, created in the Style Manager

Array of content_editor_files

Type

URL

Description

CSS

https://ceditor.setka.io

/company.v.1.2.3.min.css

editor interface style file

JS

https://ceditor.setka.io

/company.v.1.2.3.min.js

JavaScript of the Setka WYSIWYG Editor

Array of theme_files

Type

URL

Description

CSS

https://ceditor.setka.io

/company.v.1.2.3.min.css

Rules for all the styles and grids of a company, created in Style Manager

JSON

https://ceditor.setka.io

/public.v.1.2.3.json

Required for a proper launch of the Setka Editor tool. Contains all the info on styles configured in Style Manager

Array of standalone_styles

To have your post reflected correctly, enable 3 CSS-files from standalone_styles array of files:

File

URL

Description

common

https://ceditor.setka.io

/common_css/common_css_1.css

Common rules for Setka Editor styles

themes

https://ceditor.setka.io/clients

/company/css/1.css

A style for specific post

layouts

https://ceditor.setka.io/clients

/company/layout_option_builds/1/1.css

The layout grid used for your posts

API request with additional parameters

To make an API request for the additional files, use an options parameter:

GET https://editor.setka.io/api/v2/integration?token=your-license-key
&options=amp,fonts,icons

Response sample:

{
  "public_token": "123456789123456789123456789",
  "plugins": [
    {
      "url": "https://ceditor.setka.io/public.v.1.2.3.js",
      "filetype": "js",
      "md5": "asdfasdfasdf"
    }
  ],
  "content_editor_files": [
    {
      "id": 1,
      "url": "https://ceditor.setka.io/company.v.1.2.3.min.css",
      "filetype": "css",
      "md5": "asdfasdfasdf"
    },
    {
      "id": 1,
      "url": "https://ceditor.setka.io/company.v.1.2.3.js",
      "filetype": "js",
      "md5": "asdfasdfasdf"
    }
  ],
  "theme_files": [
    {
      "id": 1,
      "url": "https://ceditor.setka.io/editor.v.1.2.3.min.css",
      "filetype": "css",
      "md5": "asdfasdfasdf"
    },
    {
      "id": 1,
      "url": "https://ceditor.setka.io/public.v.1.2.3.json",
      "filetype": "json",
      "md5": "asdfasdfasdf"
    }
  ],
  "standalone_styles": {
    "common": [
      {
        "id": 1,
        "url": "https://ceditor.setka.io/common_css/common_css_1.css",
        "filetype": "css"
      }
    ],
    "themes": [
      {
        "id": "1",
        "url": "https://ceditor.setka.io/clients/company/css/1.css",
        "filetype": "css"
      }
    ],
    "layouts": [
      {
        "id": "1",
        "url": "https://ceditor.setka.io/clients/company/layout_option_builds/1/1.css",
        "filetype": "css"
      }
    ]
  },
  "amp_styles": {
    "common": [
      {
        "id": 1,
        "url": "https://ceditor.setka.io/common_css/common_css_1_amp.css",
        "filetype": "css"
      }
    ],
    "themes": [
      {
        "id": "1",
        "url": "https://ceditor.setka.io/clients/company/theme_builds/1/2.css",
        "filetype": "css",
        "fonts": [
          "https://fonts.googleapis.com/css?family=Open+Sans:400,700%7COpen+Sans+Condensed:400,400i,700&subset=cyrillic&display=swap"
        ]
      }
    ],
    "layouts": [
      {
        "id": "1",
        "url": "https://ceditor.setka.io/clients/1/layout_option_builds/1/2.css",
        "filetype": "css"
      }
    ]
  },
  "icons": [
    {
      "id": 1,
      "url": "https://ceditor.setka.io/clients/company/css/assets/1/img/icon-name.png",
      "filetype": "image"
    }
  ],
  "fonts": [
    {
      "id": 1,
      "url": "https://ceditor.setka.io/clients/company/css/assets/fonts/1/font-name.woff",
      "filetype": "font"
    }
  ]
}

Description of a received array of files

File

URL

Description

An array of files needed to reflect posts correctly on AMP pages

icons

https://ceditor.setka.io/clients

/company/css/assets

/1/img/icon-name.png

Icons that are uploaded in your style. You should download these files only if the style is hosted on your server. Icons are downloaded via Setka CDN by default in General or Separated style files; no additional actions needed

fonts

https://ceditor.setka.io/clients

/company/css/assets

/fonts/1/font-name.woff

Custom .woff fonts uploaded into your styles in the Style Manager. You should download these files only if the style is hosted on your server. Icons are downloaded via Setka CDN by default in General or Separated style files; no additional actions are needed.

amp_styles array of files

File

URL

Description

common

https://ceditor.setka.io

/common_css/common_css_1_amp.css

Common rules for AMP pages styles

themes

https://ceditor.setka.io

/clients/company/theme_builds/1/2.css

A style for specific post

layouts

https://ceditor.setka.io

/clients/1/layout_option_builds/1/2.css

The grid layout used for your posts

API request for specific arrays of files

To get the needed array of files, add a select parameter to your request, then enumerate these files separated by commas:

GET https://editor.setka.io/api/v2/integration?token=your-license-key
&select=plugins,editor,theme,standalone,amp,fonts,icons

List of available files

File

Type

Description

plugins

JS

Scripts that help running interactive elements of your posts

content_editor_files

JS, CSS

JS and CSS editor files

theme_files

JSON, CSS

JSON config file and a concatenated CSS file

standalone_styles

CSS

Separate style files

amp_styles

CSS

AMP styles

fonts

WOFF

Custom fonts

icons

PNG, SVG

Icons

Last updated