DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

How can I get value, and check on change of DNN texteditor

 4 Replies
 1 Subscribed to this topic
 28 Subscribed to this forum
Sort:
Author
Messages
New Around Here
Posts: 9
New Around Here

<%@ Register Src="~/controls/texteditor.ascx" TagPrefix="uc1" TagName="texteditor" %>

<uc1:texteditor runat="server" ID="teContent" Height="600" Width="100%" ClientIDMode="Static"  ChooseMode="false" ChooseRender="false" />

So, i try using jquery get value of texteditor. But it's not working with me.

var contentx = document.getElementById('<%=teContent.ClientID %>').value;

When i change content on texteditor, but client can not change follow that

Veteran Member
Posts: 546
Veteran Member
MVP
MVP
You're an MVP!
Please be aware, CkEeditor is using an iFrame for the content area.
I suggest checking the documentation at https://ckeditor.com/
New Around Here
Posts: 9
New Around Here
Posted By Sebastian Leupold on 15 May 2021 10:59 AM
Please be aware, CkEeditor is using an iFrame for the content area.
I suggest checking the documentation at https://ckeditor.com/

 

Tks my buddy!

If i onlye use CKeditor, i can use this code for get data and check onchange on textare, it 's ok

var editor = CKEDITOR.replace('<%=teContent.ClientID %>');
    editor.on('change', function (evt) {
        elEditor = editor.getData();
        formModified = true;
    })

but if i want use dnn:texteidtor then i can not get data value of editor, and i can check onchange this editor

 

Veteran Member
Posts: 546
Veteran Member
MVP
MVP
You're an MVP!
please be aware, that dnn Texteditor is a wrapper for the htmlRditor provider, which may contain the CkEditor instance or an instance of another editor configured by the superuser.
New Around Here
Posts: 9
New Around Here

Tks my Buddy!

But I have some problem with my UserController TextEdit

I'm using userController

<%@ Register Src="~/controls/texteditor.ascx" TagPrefix="uc1" TagName="texteditor" %>

<uc1:texteditor runat="server" ID="teContent" ChooseMode="false" />

So now, I want get realtime with value of . tenContent
I had try with some option with jquery but not working

    var editor = CKEDITOR.instances.<%=teContent.ClientID%>_teContent;
    //CKEDITOR.instances.<%=teContent.ClientID%>_teContent;
    var tencontentz = $('#cke_dnn_ctr8326_newsedit_teContent_teContent div div div iframe #document html body').val();
    console.log(tencontentz);


How can i get value of UserController TexEditor

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

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

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. 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.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved