This is a migrated thread and some comments may be shown as answers.

[Solved] Radcontrols with dnn active forum module

3 Answers 124 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Amith S
Top achievements
Rank 1
Amith S asked on 06 Dec 2009, 09:51 PM
Hi,
I have installed the active forum module on my site. I have also enabled the radcontrols, Then what i did is i got a custom smiley and i want to insert it into the reply textbox. As long as rad controls are off i can directly insert them with the ID i got from the 'View source' page for the textarea. But radcontrols is changing all the ID's when it is turned on. Can u please tell me how i can insert into the active forum modules reply textbox when rad controls is turned on.i just want to insert text on a click event using javascript

Thanks,
Amith

3 Answers, 1 is accepted

Sort by
0
Amith S
Top achievements
Rank 1
answered on 06 Dec 2009, 09:57 PM
Also i need to get all this done in javascript only because the dnn module is a PA

Thanks
0
Accepted
Lini
Telerik team
answered on 08 Dec 2009, 07:24 AM
Hello Amith,

You can use the client API method "pasteHtml" to add content to the editor. For more information, see the following help article - http://www.telerik.com/help/aspnet-ajax/editor_pastehtml.html

You can use the following JavaScript code to find the RadEditor instance on the page:

if (typeof ($telerik) != "undefined")
{
    if ($telerik.radControls && Telerik.Web.UI.RadEditor)
    {
        for (var i = 0, l = $telerik.radControls.length; i < l; i++)
        {
            var control = $telerik.radControls[i];
            if (Telerik.Web.UI.RadEditor.isInstanceOfType(control))
            {
                var editor = control;
//.... editor is the RadEditor client instance.
            }
        }
    }
}
 
Kind regards,
Lini
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Amith S
Top achievements
Rank 1
answered on 08 Dec 2009, 10:47 AM
Hey Lini,

Thanks alot, that works perfectly :)
Just added the editor.pasteHtml and it inserted

Have a great day,

Amith
Tags
Editor
Asked by
Amith S
Top achievements
Rank 1
Answers by
Amith S
Top achievements
Rank 1
Lini
Telerik team
Share this question
or