Sets the RadEditor visible on the client.
|
function SetVisible (isVisible) |
| isVisible |
boolean |
If true RadEditor will be visible on the client. |
In scenarios where Telerik RadEditor is hidden in an element (div, table, etc.) by using inline style="DISPLAY:none", it cannot be used by end-users with Mozilla-based browsers. The problem is due to the fact that the editor cannot get focus. This is a known issue and the problem is not related to Telerik RadEditor but rather to the Mozilla browser.
To solve the problem, Telerik RadEditor provides the SetVisible() method. You should explicitly call this method as the editor has no way of knowing that its parent is visible or hidden.
Here is an example:
| ASPX/ASCX |
Copy Code |
|
<form id="Form1" method="post" runat="server"> <table> <tr id="HiddenRow" style="DISPLAY:none"> <td> <rad:RadEditor id="RadEditor1" editable="true" Runat="server"></rad:RadEditor> </td> <td></td> </tr> </table> <script language="javascript"> function ShowRow() { var row = document.getElementById("HiddenRow"); //get a reference to the editor's parent element row.style.display = "block"; var editor = <%= RadEditor1.ClientID %>; //get a reference to the editor editor.SetVisible(true); //make the editor visible } </script> <input type="button" value="Show Row" onclick="ShowRow()"> </form> |