tinymce-vue
tinymce-vue copied to clipboard
TinyMCE editor caret position is not updated correctly after using word suggestion / swipe typing on iOS and iPadOS devices.
Hi, I am currently facing some issues inserting custom plugin content into the editor at the correct position when using the iOS QuickPath (swipe-typing) and iPadOS word suggestion input. I believe it has relation to the editor sliding toolbar mode as well.
You may refer to the sandbox app that I have created: https://codesandbox.io/s/tinymcevue-forked-1nixp?file=/src/App.vue
To replicate the issue:
- Ensure that the device is configured with word suggestion / swipe-typing.
- Ensure that the the toolbar is longer than the screen, such the toolbar is collapsed and the ellipsis (3 dots) button is shown. Do not expand the toolbar yet.
- Start typing a word manually, for example 'This".
- After which use the word suggestion / swipe-typing.
- Without manually typing new characters/words, click on the ellipsis button to expand the toolbar fully.
- Click on the last toolbar action, which is a custom plugin I have created to insert a "div" into the editor using editor.insertContent() function.
Expected behavior: If the word suggestion / swipe-typing produces the sentence: "This is an editor", then the inserted "div" content should be added at the end of the sentence, after the word "editor".
Current behavior: The "div" content is added at the place where we have manually type, in this case, after the "This".
You can also refer to this video: https://user-images.githubusercontent.com/18497892/109633957-aab73e00-7b83-11eb-86ea-60aa45fe581d.mov
Currently I am using:
- @tinymce/tinymce-vue version 3.2.8
- vue version 2.6.11
Thanks.