I am using EpicEditor in one my project. So as per the doc, I have added textarea property to my textarea id, so when page load first time all content from textarea is showing in the EpicEditor. Works great!!!
PROBLEM:
I am getting real-time updates from server for that particular record and then I am updating the form fields value accordingly. So I am not able to set the new value in the EpicEditor. I have updated the reference textarea value but it will not sync to EpicEditor.
SOLUTION
I want to set the new value in the EpicEditor whenever some updates occurred on the reference textarea.
var self = this;
var opts = {
container: 'epiceditor',
textarea: 'myTextArea',
basePath: 'epiceditor',
...
}
var editor = new EpicEditor(opts);
self.editor.load();
// Now, import some content into the editor
// Since I don't know the filename I'm using `null` which will default to the current filename
editor.importFile(null, 'This is to be displayed in the epic editor');
This should automatically update the textarea. If it does not update the textarea that's a bug and please send a ticket with your code and a reproducible case:https://github.com/OscarGodson/EpicEditor/issues/new
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With