Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsFCKeditorFCKeditorGet dnn text editor control on client side using javascriptGet dnn text editor control on client side using javascript
Previous
 
Next
New Post
5/31/2013 3:02 AM
 
Hi All,

I am using dnn:TextEditor. I need to to get the instance of it on the client side by using javascript. I am using below code
var editor= FCKeditorAPI.GetInstance('dnn_ctr1052_ManageEmailTemplate_txtContent_txtContent');
 to get its instance.
But I am getting below error when I look in firebug console.
ReferenceError: FCKeditorAPI is not defined

My dnn version is 6.2.
Please suggest what to do ?

Thanks,
Avinash Kumar
Mindfire Solutions

 
New Post
5/31/2013 3:37 AM
 
Hi Avinash, don't know whether this is the reason for the error but the FCK Editor doesn't work in DNN 6+, you need to use the DNNRadEditor or upgrade FCK to the CK Editor.
 
New Post
5/31/2013 4:12 AM
 
Hi Pingle,

Thanks for reply. But I am using normal dnn:TextEditor in my ascx page. So, is there any way to get its instance in javascript ? As I earlier said I m using dnn 6.2.

Thanks,
Avinash Kumar
Mindfire Solutions
 
New Post
5/31/2013 5:06 AM
 

Hi All,

I have found the solution by using just few lines of code.
var editor = $find('dnn_ctr1052_ManageEmailTemplate_txtContent_txtContent');
                if (editor)
                       editor.set_html(tag);

Cheers.. :)

Thanks,
Avinash Kumar
Mindfire Solutions



 
New Post
12/10/2015 3:32 PM
 

Avinash - this is awesome!  Thank you for posting your solution as I just needed this today - and a co-working told me it couldn't be done!  



Andrew Walker

Learn to make your own beer and wine at homeIf you enjoy making your own beer and/or wine - be sure to check out http://www.ForemostBrewing.com
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsFCKeditorFCKeditorGet dnn text editor control on client side using javascriptGet dnn text editor control on client side using javascript


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out