ckeditor4
ckeditor4 copied to clipboard
Autocomplete should put the selection after output template
Are you reporting a feature request or a bug?
Bug
Provide detailed reproduction steps (if any)
This plugin is based on not yet published Mentions feature branch t/1703-b.
- Open output template manual test.
- Focus the editor.
- Type "@" to start autocompleteion.
- Accept first entry.
- Type " and " (note spaces).
- Type "@" to start another autocompletion.
- Accept first entry.
Expected result
Text between the autocompleted values should not be bolded.
Actual result
The text is bolded.
Reason is that the selection gets inside of the inserted element.
There are two solutinos to that:
- Put a selection outside that element (might be impossible on WebKits due to their normalization).
- Add an option to insert a space after the insertion. This option could be technically realized by adding a space to
outputTemplatebut the problem is if there is already a space after the text where you started autocompletion, it would just stupidly insert a space there resulting with two spaces.
Other details
This issue is a follow up of https://github.com/ckeditor/ckeditor-dev/pull/1992#pullrequestreview-123272523.
- Browser: Any
- OS: Any
- CKEditor version: 4.10.0