Re: Want to access PlainText property at clien side in javascript function

  •  04-30-2008, 1:00 AM

    Re: Want to access PlainText property at clien side in javascript function

    hello Adam or others
    Your code is working, but when we check by this function that editor is blank or not

    function checkEditorBlankValue()

    {

    var editorId = document.getElementById('<% = Editor1.ClientID%>');

    var content = editorId.GetDocument();

    var textofeditor=innerText(content.body);

    if(trim(textofeditor)=="")

    { var msg="Would you like to save this document?";

    var resultmsg=window.confirm(msg);

    if(resultmsg)

    {

    alert("You cannot save blank editor.")

     
    return false;

     

    }

    }

    }

    If this function return false (when editor is blank) then if we type any character in cute editor then

    function CuteEditor_OnChange(editor)

     not called at that time and if we give space then my validation function is called from which i call checkEditorBlankValue() function and 'Delete' key is not working for selected text.
     
    Please reply soon
View Complete Thread