Browse Source

Up RTE

pull/4746/head
Artur Arseniev 4 years ago
parent
commit
9dcbeadd4f
  1. 13
      src/rich_text_editor/index.ts
  2. 9
      src/rich_text_editor/model/RichTextEditor.ts

13
src/rich_text_editor/index.ts

@ -69,9 +69,10 @@ export default class RichTextEditorModule extends Module<RichTextEditorConfig &
super(em, 'RichTextEditor', defaults);
const { config } = this;
const ppfx = config.pStylePrefix;
// if (ppfx) {
// config.stylePrefix = ppfx + config.stylePrefix;
// }
if (ppfx) {
config.stylePrefix = ppfx + config.stylePrefix;
}
this.pfx = config.stylePrefix!;
this.actions = config.actions || [];
@ -264,7 +265,7 @@ export default class RichTextEditorModule extends Module<RichTextEditorConfig &
* @return {HTMLElement}
*/
getToolbarEl() {
return toolbar;
return this.toolbar;
}
/**
@ -272,10 +273,10 @@ export default class RichTextEditorModule extends Module<RichTextEditorConfig &
* @private
*/
updatePosition() {
const { em } = this;
const { em, toolbar } = this;
const un = 'px';
const canvas = em.get('Canvas');
const { style } = this.toolbar;
const { style } = toolbar;
const pos = canvas.getTargetToElementFixed(this.lastEl, toolbar, {
event: 'rteToolbarPosUpdate',
left: 0,

9
src/rich_text_editor/model/RichTextEditor.ts

@ -172,14 +172,7 @@ export default class RichTextEditor {
return this;
}
destroy() {
// this.el = 0;
// this.doc = 0;
// this.actionbar = 0;
// this.settings = {};
// this.classes = {};
// this.actions = [];
}
destroy() {}
setEl(el: HTMLElement) {
this.el = el;

Loading…
Cancel
Save