Browse Source

Avoid default style classes with customUI

pull/4746/head
Artur Arseniev 4 years ago
parent
commit
f586906052
  1. 5
      src/editor/view/EditorView.ts

5
src/editor/view/EditorView.ts

@ -27,6 +27,9 @@ export default class EditorView extends View<EditorModel> {
const { Panels, Canvas } = model.attributes;
const { config, modules } = model;
const pfx = config.stylePrefix;
const classNames = [`${pfx}editor`];
!config.customUI && classNames.push(`${pfx}one-bg ${pfx}two-color`);
// @ts-ignore
const contEl = $(config.el || `body ${config.container}`);
config.cssIcons && appendStyles(config.cssIcons, { unique: true, prepand: true });
@ -46,7 +49,7 @@ export default class EditorView extends View<EditorModel> {
shallowCanvasEl.style.display = 'none';
$el.append(shallowCanvasEl);
$el.attr('class', `${pfx}editor ${pfx}one-bg ${pfx}two-color`);
$el.attr('class', classNames.join(' '));
// @ts-ignore
contEl.addClass(`${pfx}editor-cont`).empty().append($el);
modules.forEach(md => md.postRender && md.postRender(this));

Loading…
Cancel
Save