I have faced a typical issue while working with fckeditor & LR version 5.2 EE SP3 (i thought it might be helpful for somebody who will come across similar scenario)
I have a requirement where i need to show fckeditor in a popup - In popup I have a drop drop , depending upon the change in drop down/select box i need to show different contents in fckeditor & other form fields (I am using servceResource to get new content)
When i used fckeditor it was working fine for first time opened popup - on change of drop down/select box & submitting the form working fine, if close the popup after submitting the popup/onchange of select box & try to open popup again and change the dropdrop i was not able to set/get contents of fckeditor.
For getting value from editor using
window.editor.getHTML();
doesn't work all the time.
My scenario was, in popup I wanted to show Editor, then read value, and afterwards post it using Ajax post. So First time it works well.
But second time when i try to get value it says "editor.getHTML function not exists".
So way around was using
document.getElementById('editor').contentWindow.getHTML();
Hope it helps someone.
Here is a good link for how to add fckeditor to portlet
http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/How+to+add+a+wysiwyg+html+editor+to+a+portlet
I have a requirement where i need to show fckeditor in a popup - In popup I have a drop drop , depending upon the change in drop down/select box i need to show different contents in fckeditor & other form fields (I am using servceResource to get new content)
When i used fckeditor it was working fine for first time opened popup - on change of drop down/select box & submitting the form working fine, if close the popup after submitting the popup/onchange of select box & try to open popup again and change the dropdrop i was not able to set/get contents of fckeditor.
For getting value from editor using
window.
doesn't work all the time.
My scenario was, in popup I wanted to show Editor, then read value, and afterwards post it using Ajax post. So First time it works well.
But second time when i try to get value it says "editor.getHTML function not exists".
So way around was using
document.getElementById('
Hope it helps someone.
Here is a good link for how to add fckeditor to portlet
http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/How+to+add+a+wysiwyg+html+editor+to+a+portlet
No comments:
Post a Comment