tinymce.full.js
function fixTableCaretPos() {
        editor.on('KeyDown SetContent VisualAid', function () {
          var last;

          // Skip empty text nodes from the end
          for (last = editor.getBody().lastChild; last; last = last.previousSibling) {
            if (last.nodeType == 3) {
              if (last.nodeValue.length > 0) {
                break;
              }
            } else if (last.nodeType == 1 && (last.tagName == 'BR' || !last.getAttribute('data-mce-bogus'))) {
              break;
            }
          }

          if (last && last.nodeName == 'TABLE') {
            if (editor.settings.forced_root_block) {
              editor.dom.add(
                editor.getBody(),
                editor.settings.forced_root_block,
                editor.settings.forced_root_block_attrs,
                Env.ie && Env.ie < 10 ? '&nbsp;' : '<br data-mce-bogus="1" />'
              );
            } else {
              editor.dom.add(editor.getBody(), 'br', { 'data-mce-bogus': '1' });
            }
          }
        });

        editor.on('PreProcess', function (o) {
          var last = o.node.lastChild;

          if (last && (last.nodeName == "BR" || (last.childNodes.length == 1 &&
            (last.firstChild.nodeName == 'BR' || last.firstChild.nodeValue == '\u00a0'))) &&
            last.previousSibling && last.previousSibling.nodeName == "TABLE") {
            editor.dom.remove(last);
          }
        });
      }
function fixTableCaretPos() {
        editor.on('KeyDown SetContent VisualAid', function () {
          var last;

          // Skip empty text nodes from the end
          for (last = editor.getBody().lastChild; last; last = last.previousSibling) {
            if (last.nodeType == 3) {
              if (last.nodeValue.length > 0) {
                break;
              }
            } else if (last.nodeType == 1 && (last.tagName == 'BR' || !last.getAttribute('data-mce-bogus'))) {
              break;
            }
          }

          if (last && last.nodeName == 'TABLE') {
            if (editor.settings.forced_root_block) {
              editor.dom.add(
                editor.getBody(),
                editor.settings.forced_root_block,
                editor.settings.forced_root_block_attrs,
                Env.ie && Env.ie < 10 ? '&nbsp;' : '<br data-mce-bogus="1" />'
              );
            } else {
              editor.dom.add(editor.getBody(), 'br', { 'data-mce-bogus': '1' });
            }
          }
        });

        editor.on('PreProcess', function (o) {
          var last = o.node.lastChild;

          if (last && (last.nodeName == "BR" || (last.childNodes.length == 1 &&
            (last.firstChild.nodeName == 'BR' || last.firstChild.nodeValue == '\u00a0'))) &&
            last.previousSibling && last.previousSibling.nodeName == "TABLE") {
            editor.dom.remove(last);
          }
        });
      }
function fixTableCaretPos ( ) { editor . on ( 'KeyDown SetContent VisualAid' , function ( ) { var last ; // Skip empty text nodes from the end for ( last = editor . getBody ( ) . lastChild ; last ; last = last . previousSibling ) { if ( last . nodeType == 3 ) { if ( last . nodeValue . length > 0 ) { break ; } } else if ( last . nodeType == 1 && ( last . tagName == 'BR' || ! last . getAttribute ( 'data-mce-bogus' ) ) ) { break ; } } if ( last && last . nodeName == 'TABLE' ) { if ( editor . settings . forced_root_block ) { editor . dom . add ( editor . getBody ( ) , editor . settings . forced_root_block , editor . settings . forced_root_block_attrs , Env . ie && Env . ie < 10 ? '&nbsp;' : '<br data-mce-bogus="1" />' ) ; } else { editor . dom . add ( editor . getBody ( ) , 'br' , { 'data-mce-bogus' : '1' } ) ; } } } ) ; editor . on ( 'PreProcess' , function ( o ) { var last = o . node . lastChild ; if ( last && ( last . nodeName == "BR" || ( last . childNodes . length == 1 && ( last . firstChild . nodeName == 'BR' || last . firstChild . nodeValue == '\u00a0' ) ) ) && last . previousSibling && last . previousSibling . nodeName == "TABLE" ) { editor . dom . remove ( last ) ; } } ) ; }
Fixes an issue on Gecko where it's impossible to place the caret behind a table This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled
Fixes an issue on Gecko where it s impossible to place the caret behind a table This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled