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

[Solved] Character Count in rad edotior prometheus

7 Answers 130 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Akhilesh
Top achievements
Rank 1
Akhilesh asked on 14 Dec 2007, 08:26 AM
hi i am rad editor premetheus version 2007.2.918.0 and want to implement character count in it
have seen one thread where it was shown how to implement it in rad editor ver 5 or so
how can this be implemented in this?

7 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 14 Dec 2007, 03:57 PM
Hi Akhilesh,

The following example in RadEditor's online help demonstrates how to achieve similar effect in RadEditor Prometheus.

Kind regards,
George
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Akhilesh
Top achievements
Rank 1
answered on 15 Dec 2007, 06:01 AM
hi the function works but i want to chk only the text count not HTML count
i tried some changes but it didnt worked
0
George
Telerik team
answered on 15 Dec 2007, 09:11 AM
Hi Akhilesh,

You can achieve the desired functionality by replacing the get_Html() method with the get_Text().

Example:
Replace the following line
var oValue = editor.get_Html(true); //get the HTML content
with this one:
var oValue = editor.get_Text(); //get the editor content as plain text

I hope this helps.

Kind regards,
George
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Akhilesh
Top achievements
Rank 1
answered on 15 Dec 2007, 10:15 AM
hi i had already tried this but it didnt worked

it throws "object dosent support this property or method"
0
George
Telerik team
answered on 15 Dec 2007, 01:38 PM
Hi Akhilesh,

You should not experience this problem with the latest version of the RadEditor "Prometheus".

For your convenience I have made and attached a sample project achieving the desired behavior. Please make sure that you are using the "Futures" version of the RadEditor "Prometheus".

Kind regards,
George
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Akhilesh
Top achievements
Rank 1
answered on 26 Dec 2007, 08:31 AM
hi i tried this on the futures version of editor but it didnt worked and same script error was thrown i.e. object dosen't support this property or method
0
Lini
Telerik team
answered on 27 Dec 2007, 12:00 PM
Hello Akhilesh,

I am attaching a complete test web site using the latest official release (2007.3.1218) of the Prometheus editor. I do not see any problems with the JavaScript for limiting the characters in the editor content.

What you can try is use get_html, set_html, get_text (lowercase) instead of get_Html, set_Html, get_Text (starting with a capital letter).

All the best,
Lini
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Editor
Asked by
Akhilesh
Top achievements
Rank 1
Answers by
George
Telerik team
Akhilesh
Top achievements
Rank 1
Lini
Telerik team
Share this question
or