Closed nivanmorgan closed 5 years ago
same thing with here also, setcontent doesnt work, i even tried setcontent example in your document and didnt work also. i am having same error: ncaught TypeError: self.error is not a function
hi @nivanmorgan @umutcodec do you guys find any luck on this? I have same issue here. I can get content but cannot set.
hi @nivanmorgan, do you find how to do it because i still cant use setContent, @ducdhm can u help us
@nivanmorgan @umutcodec @yoganhoho @sibox1337 I have fixed this issue. Please check with latest version.
FYI: Please call method of KEditor follow this guide
KEditor.prototype.setContent(content); with no selectors
KEditor.prototype.setContent(content, '#contentarea');
KEditor.prototype.setContent(content, '#contentarea #subelement ');
They are invalid calls!
Describe the bug A clear and concise description of what the bug is. I can't set content on the editor. I am using the latest version. I downloaded my assets from github. I am trying to add an html button to allow users to paste or edit the html. But found problems setting the content back in the editor. So I tried removing all code and just setting the initial content with no use.
Version
latest verson
To Reproduce
Here is how I initialized my editor
After that I tried
if I use #contentarea as my selector I get self.error is not defined as contentArea is not defined. Weird how I am able to get the content with this selector but not set it.
I researched a bug fix here and it said set content on subelement. I used different classes and ids and I get an error can't addClass() to the element form initContentAreaClass.
If I manipulate the iframe and set contents on the keditor-iframe and it worked visually, but editor content was not set. I don't know where the conflict is but can't even set the content to a default paragraph when I load it. Why is it working for me? Am I doing something wrong here? I am using the ckeditor plugin . setData and getData from ckeditor is so easy from my past experience so I don't know why keditor set content won't work. get content is working for me