Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
seamuslee
ckeditor5
Commits
da08feca
Commit
da08feca
authored
Feb 22, 2021
by
bgm
Committed by
bgm
Feb 22, 2021
Browse files
Fixes token selection
parent
68a2142e
Changes
1
Hide whitespace changes
Inline
Side-by-side
js/wysiwyg/crm.ckeditor5.js
View file @
da08feca
...
...
@@ -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
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment