Browse Source

Update RTE configs

pull/236/merge
Artur Arseniev 9 years ago
parent
commit
913da83f8f
  1. 1
      index.html
  2. 7
      src/rich_text_editor/config/config.js
  3. 3
      src/rich_text_editor/index.js

1
index.html

@ -13,6 +13,7 @@
</style>
<body>
<div id="gjs" style="height:0px; overflow:hidden;">
<div>Some TEXT</div>
<header class="header-banner">
<div class="container-width">
<div class="logo-container">

7
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',

3
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;

Loading…
Cancel
Save