Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Showing and hiding the RadEditor control dynamically

$
0
0

Hi All,

I've implemented this code from Docs and Api reference but the toolbar is no longer showing when I change the position of div when shown.

Any Help?

Thanks in advance!

<divid="wrapper"style="display:none;">
    <telerik:RadEditorID="RadEditor1"runat="server">
    </telerik:RadEditor>
</div>
 
<telerik:RadButtonrunat="server"ID="RadButton1"Text="Toggle Visibility"
    OnClientClicked="OnClientClicked"AutoPostBack="false">
</telerik:RadButton>
 
<scripttype="text/javascript">
    function OnClientClicked(sender, args) {
        var editor = $find("<%= RadEditor1.ClientID %>");
        var wrapper = $get("wrapper");
        var isEditorVisible = editor.isVisible();
 
        if (isEditorVisible) {
            $telerik.$(wrapper).hide(); // jQuery approach
            //wrapper.style.display = "none"; // JS approach
        } else {
           $(wrapper).attr("style", "LEFT: 300px; WIDTH: 400px; HEIGHT: 500px;  POSITION: absolute; TOP: 62px; z-index: 210");
            //Code added to set position when shown
            $telerik.$(wrapper).show(); // jQuery approach
            //wrapper.style.display = ""; // JS approach
 
            editor.repaint();
        }
    }
</script>

Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>