MDL-24932 Fixed regression caused by the previous commit

To reproduce it, I just added a smiley via the popup and inserted some
character directly afterwards. While the smiley img was saved, the text
was not 8-o (it even did not appear in the HTML source view of the
editor before the save).
This commit is contained in:
David Mudrak 2010-10-29 22:51:51 +00:00
parent d504aeba97
commit 2bd56a246f

View File

@ -3,7 +3,7 @@ var MoodleEmoticonDialog = {
bookmark : null,
init : function() {
this.bookmark = tinyMCEPopup.editor.selection.getBookmark();
this.bookmark = tinyMCEPopup.editor.selection.getBookmark(1, true);
// register event handlers for the table rows
tinymce.each(tinymce.DOM.select('tr.emoticoninfo', document), function(row) {
@ -36,7 +36,7 @@ var MoodleEmoticonDialog = {
if (i == index) {
tinyMCEPopup.editor.selection.moveToBookmark(this.bookmark);
tinyMCEPopup.editor.execCommand('mceInsertContent', false, emoticons[emoticon]);
this.bookmark = tinyMCEPopup.editor.selection.getBookmark();
this.bookmark = tinyMCEPopup.editor.selection.getBookmark(1, true);
tinyMCEPopup.close();
return;
}