Content Templater

Cursor placement after insertion of snippet

4 years 2 weeks ago #66674

Dan Phillips's Avatar Dan Phillips

I am using Content Templater to create a menu from which users can select individual characters from the International Phonetic Alphabet (IPA). Each letter is a separate snippet and they are all in the same category. That much works as expected. When choosing from the modal or dropdown, the selected character is inserted at the cursor as desired, but then the cursor moves to the very beginning of the editor in both JCE and TinyMCE. That means the user has to reset the position of the cursor after every entry. I don't recall that happening when using other snippets. Is that normal functioning? Is there an option somewhere that I'm missing? Is there any way to force the cursor to be placed immediately after the inserted snippet?

4 years 2 weeks ago #66680

Peter van Westen's Avatar Peter van Westen Admin

Because templates contain rich text, inserting this html inside other elements can create invalid html format.
The way Content Templater solves this is to toggle the editor to the html view and back to the WYSIWYG view again.
This causes the reset of the cursor.

I think I have found a different way to do this that fixes the issue.
Please try the latest development version from:
www.regularlabs.com/development-releases

Please not that a lot of code has changed in this version, and it isn't fully tested yet. So I advise you not to test this on a live site yet.

4 years 2 weeks ago #66693

Dan Phillips's Avatar Dan Phillips

Ah, that makes perfect sense. The new version, however, appears initially to work beautifully 😎

Thank you!!!!

4 years 2 weeks ago #66698

Peter van Westen's Avatar Peter van Westen Admin

Ok, great 🙂
The fix will be included in the next release.