---
title: Editor classes reference
project: CMS
version: 1.0
section: development
language: en
license: MIT
url: https://totaljs.es/docs/cms/1-0/development/editor-classes/
updated: 2026-11-20T06:51:47.968Z
---

# Editor classes reference

> The CMS_ classes that make parts of a widget editable, and the image attributes.

Add these classes to the elements of `<body>`. CMS removes them from the public page, except `CMS_mv` and `CMS_mh`. See [Editable content](../editable-content/) for examples.

## API

### class="CMS_edit"

Type: `class`

Makes the element editable with Edit.

Text is typed in place. An `img` opens the picture picker, an icon (`ti`) opens the icon picker and a link can be changed with **Change link**. It also enables **Change attributes**.

### class="CMS_edit CMS_multiline"

Type: `class`

Lets Enter add a line break in an edited text.

Without it, `Enter` ends the editing. Pasted text keeps its lines.

### class="CMS_attribute"

Type: `class`

Enables Change attributes.

Opens the [attributes editor](/cms/1-0/guides/element-attributes/) for the element.

### class="CMS_repeat"

Type: `class`

Enables Duplicate.

The copy is added after the element and gets `CMS_remove`.

### class="CMS_remove"

Type: `class`

Enables Remove.

The user can delete the element. Inside it, **Remove** on a child removes the nearest parent with this class.

### class="CMS_widgets"

Type: `class`

Makes the element an area for other widgets.

Enables **Add a widget** and pasting a copied widget.

### class="CMS_edit CMS_unwrap"

Type: `class`

Removes the tag of the element on the public page.

The content stays. Use it for a `span` that exists only to be editable.

### class="CMS_editor"

Type: `class`

Shows the element only in the editor.

CMS removes the element with its content from the public page. `CMS_trash` does the same.

### .CMS_preview .CLASS-part { }

Type: `class`

Is on the body of the page in the editor.

Use it in CSS to show in the editor what visitors see only after an action.

### class="CMS_mv CMS_mh"

Type: `class`

The vertical and horizontal margins of an instance.

The editor adds them to the wrapper, and the user switches them with **Toggle vertical margin** and **Toggle horizontal margin**. The layout defines their size, and they stay on the public page.

### <img class="CMS_edit" data-cms-width="300" data-cms-height="200" />

Type: `property`

The size of an editable image.

The editor shows a grey placeholder of this size and crops the picked picture to it. Leave `src` empty in the file.
