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

Get Editor Value from JavaScript

3 Answers 125 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
MarcoFischboeck
Top achievements
Rank 1
MarcoFischboeck asked on 17 Aug 2007, 10:20 AM
Hello,

i use the RadEditor Lite in a WCM Scenario.

I want to get the value from the current Editor (the HTML Code / Text wich was typed in).

The Field in the PageLoyout is labeled with: "Content" 
<radE:RadHTMLField runat="server" id="Content" FieldName="Content">

Can you help me?

3 Answers, 1 is accepted

Sort by
0
Lini
Telerik team
answered on 17 Aug 2007, 02:03 PM
Hi,

You can get a reference to all editors on the page with the following piece of JavaScript code:

<script type="text/javascript">     
function test()     
{     
    if (typeof(RadEditorGlobalArray)!="undefined")     
    {     
        for(i=0;i<RadEditorGlobalArray.length;i++)     
        {     
            var editor = RadEditorGlobalArray[i];     
            var html = editor.GetHtml(true);  
            alert(html);   
        }     
    }     
}     
</script>   

I hope this helps.

Sincerely yours,
Lini
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
MarcoFischboeck
Top achievements
Rank 1
answered on 17 Aug 2007, 06:40 PM
Oh, great, it works! Thank you very much!


In the near feature i have to

  • add a button to the menu 
  • get the current selected Text.
  • insert a special html tag arround the selected Text

Is there a kind of Client-Side SDK available? Maybe this can give me the answers?

Greeting from Germany Marco

 
0
Lini
Telerik team
answered on 20 Aug 2007, 09:36 AM
Hi Marco,

A good place to start is the RadEditor for ASP.NET documentation - http://www.telerik.com/help/aspnet/editor/

You can find out about the Client API and much more (customizing the toolbar, creating a dialog window, etc.) in the above help link.

Kind regards,
Lini
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
WebParts for SharePoint
Asked by
MarcoFischboeck
Top achievements
Rank 1
Answers by
Lini
Telerik team
MarcoFischboeck
Top achievements
Rank 1
Share this question
or