I'm developing a Chrome Extension and need to programmatically insert text into a Froala Editor instance on a webpage. I'm using TypeScript for the extension's development.
I've attempted various methods to achieve this, including:
Directly manipulating the DOM element's value or innerHTML.
Using document.execCommand('insertText', false, 'my text').
Exploring the Froala Editor API documentation for a direct method to set content.
Unfortunately, none of these approaches have been successful. The Froala Editor seems to manage its content in a way that prevents simple DOM manipulation. I've also consulted several AI models for solutions, but the suggested code snippets didn't work as expected.
I would greatly appreciate it if anyone with experience in Froala Editor or Chrome Extension development could provide guidance on how to programmatically insert text into the editor's content area. A code example in TypeScript would be extremely helpful.
Thank you for your time and assistance.