TinyMCE on IE8: text cursor issue

when I type something, for example, 8, and click "bold" on the toolbar over the text editor, the cursor goes to the beginning of the whole text editor. is this a bug in tiny mce?

on the other hand, if I select the text I printed and press control + b, no problem; both are fine in firefox, ie6

+3
source share
3 answers

I would not say that this is a bug in IE8.
The cursor does not move through magic, someone (tinymce) places it somewhere.
Therefore, if the cursor does not appear in the expected position, this should be an incorrect behavior in tinima.

"bugfix", IE8 (Win7).
?

+1

"- > " IE8? ( F7)

  • .
+2

, , , . , "onchange_callback" init:

tinyMCE.init({..., onchange_callback: 'updateSelectionBookmark', ...});

updateSelectionBookmark, - , (: http://tinymce.moxiecode.com/wiki.php/Configuration:onchange_callback). updateSelectionBookmark :

function updateSelectionBookmark (ed) {
  ed.updatedSelectionBookmark = ed.selection.getBookmark(1);
}

, .

, :

ed.selection.moveToBookmark(ed.updatedSelectionBookmark);

HTML, ( mceInsertRawHTML).

, -, .

( ): , TinyMCE 3.2.2.3, 3.4.4 IE9. , , . ( ) . , , . onchange_callback onEvent event:

tinyMCE.init({
  ...,
  setup: function (ed) {
    ed.onEvent.add(function (ed, e) {
      ed.updatedSelectionBookmark = ed.selection.getBookmark(1);
    });
  },
  ...
});

updateSelectionBookmark onchange_callback. onEvent , onChange, , , , .

moveToBookmark, , . IE9, Chrome, FF6, / /.

+2

Source: https://habr.com/ru/post/1773006/


All Articles