angularjsfroala

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

  • 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.