Quantcast
Channel: CKEditor™ Provider for DNN®
Viewing all articles
Browse latest Browse all 1992

New Post: compatibility with 2sexy content

$
0
0
Ingo, Could you help me out with the following?

The codeplex project https://sexycontent.codeplex.com/ has some javascript that is targetted towards RadEditor. I'm trying to help them write a CKeditor variant.

They need to do two things:
  • how to enable /disable dnnckeditor client-side
  • how to set and get the value client-side
This is the current code to enable/disable the editor
                var editor = $find(objWrapper.find(".RadEditor").get(0).id);
                Controller.SetReadOnly = function (readOnlyState) {
                    // Bug DNN 7: Radeditor won't get disabled if this runs without timeout
                    window.setTimeout(function () {
                        // Bug in Radeditor: Must not set editable to the same value twice!
                        if (!readOnlyState != editor.get_editable()) {
                            editor.enableEditing(!readOnlyState);
                            editor.set_editable(!readOnlyState);
                            if (readOnlyState == true) editor.get_document().body.style.backgroundColor = "#EEE";
                            else editor.get_document().body.style.backgroundColor = "";
                        }
                    }, 1);
and here are the instructions used to get and set content to the radeditor
var editor = $find(objWrapper.find(".RadEditor").get(0).id);
editor.set_html(value);
editor.get_html();
I think that the first line should be this?
var editor = $find(objWrapper.find(".cke").get(0).id);
Anny suggestions for the others? Or could you give me some hints, clues and/or references that would help me to find the alternatives for CKeditor?

Thx
Rob

Viewing all articles
Browse latest Browse all 1992

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>