From 913da83f8facbb1d1e641929eaf1185c5dd069e7 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 9 Aug 2017 14:45:32 +0200 Subject: [PATCH] Update RTE configs --- index.html | 1 + src/rich_text_editor/config/config.js | 7 ++++++- src/rich_text_editor/index.js | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 6c77e59e4..b9d563d07 100755 --- a/index.html +++ b/index.html @@ -13,6 +13,7 @@
+
Some TEXT
diff --git a/src/rich_text_editor/config/config.js b/src/rich_text_editor/config/config.js index 26d08007d..b2d8b6a56 100644 --- a/src/rich_text_editor/config/config.js +++ b/src/rich_text_editor/config/config.js @@ -1,7 +1,12 @@ module.exports = { stylePrefix : 'rte-', toolbarId : 'toolbar', - containerId : 'wrapper', + + // If true, moves the toolbar below the element when the top canvas + // edge is reached + adjustToolbar: 1, + + // Default toolbar commands commands : [{ command: 'bold', title: 'Bold', diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index 71c37b324..38de63886 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -113,7 +113,7 @@ module.exports = () => { }, /** - * Triggered when the offset of the editro is changed + * Triggered when the offset of the editor is changed * @private */ udpatePosition() { @@ -122,6 +122,7 @@ module.exports = () => { var pos = canvas.getTargetToElementDim(toolbar.el, this.lastEl, { event: 'rteToolbarPosUpdate', }); + console.log(pos); var toolbarStyle = toolbar.el.style; toolbarStyle.top = pos.top + u; toolbarStyle.left = pos.left + u;