Commit da08feca authored by bgm's avatar bgm Committed by bgm
Browse files

Fixes token selection

parent 68a2142e
......@@ -435,7 +435,10 @@
CRM.wysiwyg.insert = function(item, text) {
var editor = getInstance(item);
if (editor) {
editor.insertText(text);
editor.model.change(writer => {
const insertPosition = editor.model.document.selection.getFirstPosition();
writer.insertText(text, insertPosition);
});
} else {
CRM.wysiwyg._insertIntoTextarea(item, text);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment