diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-09-12 12:09:11 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-09-12 12:09:11 +0200 |
| commit | c5f680200cd5a213b71584734f266630fd25cdfa (patch) | |
| tree | 0ac30ee86a7d99103e7d69f1f0ffb5fbbee9851b /addons/web_editor/static/src/js | |
| parent | e7205b7992f55ef2cf9df9d8f2b71fafe9ed6348 (diff) | |
| parent | d08b4407be3cf9b404087056a413fbdc9eecbd9d (diff) | |
[MERGE] forward port branch saas-17 up to d08b4407be3
Diffstat (limited to 'addons/web_editor/static/src/js')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/summernote.js | 5 | ||||
| -rw-r--r-- | addons/web_editor/static/src/js/widgets/widgets.js | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/editor/summernote.js b/addons/web_editor/static/src/js/editor/summernote.js index f054eca48eb..fa919a5a908 100644 --- a/addons/web_editor/static/src/js/editor/summernote.js +++ b/addons/web_editor/static/src/js/editor/summernote.js @@ -496,7 +496,7 @@ dom.removeBetween = function (sc, so, ec, eo, towrite) { }; for (var i=0; i<nodes.length; i++) { - if (!dom.ancestor(nodes[i], ancestor_first_last) && !$.contains(nodes[i], before) && !$.contains(nodes[i], after)) { + if (!dom.ancestor(nodes[i], ancestor_first_last) && !$.contains(nodes[i], before) && !$.contains(nodes[i], after) && !dom.isEditable(nodes[i])) { nodes[i].parentNode.removeChild(nodes[i]); } } @@ -1082,6 +1082,9 @@ $.summernote.pluginEvents.enter = function (event, editor, layoutInfo) { // double enter on the end of a blockquote & pre = new line out of the list $('<p></p>').append(br).insertAfter($(r.sc).closest('blockquote, pre')); node = br; + } else if (dom.isEditable(dom.node(r.sc))) { + // if we are directly in an editable, only SHIFT + ENTER should add a newline + node = null; } else if (last === r.sc) { if (dom.isBR(last)) { last = last.parentNode; diff --git a/addons/web_editor/static/src/js/widgets/widgets.js b/addons/web_editor/static/src/js/widgets/widgets.js index c889fb3d221..8f3d44ec75e 100644 --- a/addons/web_editor/static/src/js/widgets/widgets.js +++ b/addons/web_editor/static/src/js/widgets/widgets.js @@ -681,7 +681,7 @@ var VideoDialog = Widget.extend({ if (this.$('.o_video_dialog_iframe').is('iframe')) { var $content = $( - '<div class="media_iframe_video" data-src="' + this.$content.attr('src') + '">'+ + '<div class="media_iframe_video" data-oe-expression="' + this.$content.attr('src') + '">'+ '<div class="css_editable_mode_display"> </div>'+ '<div class="media_iframe_video_size" contenteditable="false"> </div>'+ '<iframe src="' + this.$content.attr('src') + '" frameborder="0" contenteditable="false"></iframe>'+ |
