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

[Solved] Blur & Focus Question

1 Answer 136 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Craig Hinkel
Top achievements
Rank 1
Craig Hinkel asked on 27 May 2008, 04:04 PM
i am trying to add functionality where the editor shows some default text whenever its content is empty. i have the following wired up but it is not working. any help would be great!

<script type="text/javascript">

function OnClientLoad(editor, args)

{

var element = document.all ? editor.get_document().body : editor.get_document();

$telerik.addExternalHandler(element,

"focus", function(e)

{

var sData = editor.get_text();

if (sData == "enter content here")

{

editor.set_html(

"");

}

});

$telerik.addExternalHandler(element,

"blur", function(e)

{

var sData = editor.get_text();

if (sData == "")

{

editor.set_html(

"enter content here");

}

});

}

</script>

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 28 May 2008, 07:16 AM
Hi Craig,

You can find how to implement your scenario in the following forum thread: EmptyText just like radTextBox.

Let me know if you need further help.


Best regards,
Rumen
the Telerik team

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