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

Sort:
You are not authorized to post a reply.





New Around Here





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

    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





      Please be aware, CkEeditor is using an iFrame for the content area.
      I suggest checking the documentation at https://ckeditor.com/





      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





          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





            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 . <strong>tenContent </strong>
            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

            You are not authorized to post a reply.

            These Forums are dedicated to the discussion of DNN Platform.

            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