Skip to main content
NiCE CXone Mpower Expert
Expert Success Center

Migrate custom editor styles from classic editor to Enhanced Editor

Migrate custom styles from the classic editor to the Enhanced Editor by mapping your existing JavaScript configuration to the new Custom Editor Styles form fields.

How the Editors compare

Each config.stylesSet.push() block in your old configuration becomes one style entry in the Enhanced Editor. The following table explains how each property maps to the new form fields:

Classic editor property Enhanced Editor field Example value
name Name Warning
element Selector div
attributes > class Class mt-warning-container
wrap: true Element Wrapping (checked) Check the box
wrap: false or omitted Element Wrapping (unchecked) Leave the box unchecked
attributes > title Not present N/A

Add your styles in the Enhanced Editor

Repeat these steps once for each style in your old configuration.

  1. Go to Site Tools > Dashboard > Site Administration > Editor Configuration.
  2. Click the Custom Editor Styles sub-page.
  3. Click Add style.
  4. Fill in the Name, Selector, and Class fields using the values from your old configuration (see previous table).
  5. For Element Wrapping:
    • Check the box if your old style had wrap: true.
    • Leave the box unchecked if your old style had wrap: false or no wrap property.
  6. Click Save.

Example

Given this configuration in the classic editor:

config.stylesSet.push({ name : 'Warning', element : 'div', wrap:true, attributes : { 'class' : 'mt-warning-container', 'title' :'Warning' } });
config.stylesSet.push({ name : 'Note', element : 'div', wrap:true, attributes : { 'class' : 'mt-notes-container', 'title' :'Note' } });
config.stylesSet.push({ name : 'Caution', element : 'div', wrap:true, attributes : { 'class' : 'mt-caution-container', 'title' :'Caution' } });
config.stylesSet.push({ name : 'Tip', element : 'div', wrap:true, attributes : { 'class' : 'mt-tip-container', 'title' :'Tip' } });

You would create four styles in the Enhanced Editor with these values:

Name Selector Class Element wrapping
Warning div mt-warning-container Checked
Note div mt-notes-container Checked
Caution div mt-caution-container Checked
Tip div mt-tip-container Checked

Custom Site CSS does not need to change. The CSS that defines how your classes look is separate from the editor configuration, and was not affected by the editor upgrade.

If styles do not render, verify your CSS is present in Site Tools > Control Panel > Branding > Custom Site CSS.

Related articles

Add custom styles to Editor (classic editor)

Custom Editor Styles (Enhanced Editor)

 

  • Was this article helpful?