'Put text via script in Froala Editor

I'm using Froala 3 with AngularJS, but I have a problem adding content from outside the editor into it.

I have a modal that displays several predefined messages, the problem occurs that I need to place this message exactly where the cursor is pointing inside Froala, and at the moment I can only place it concatenated at the end of the text.

How can I do this?



Solution 1:[1]

You can use their selection method to set the cursor according to your needs before inserting the content: https://froala.com/wysiwyg-editor/docs/methods/#selection.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Pervaiz Dattoo