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

Showing and hiding the RadEditor control dynamically

1 Answer 27 Views
Editor
This is a migrated thread and some comments may be shown as answers.
RJ
Top achievements
Rank 1
RJ asked on 03 Sep 2015, 12:31 PM

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!

<div id="wrapper" style="display:none;">
    <telerik:RadEditor ID="RadEditor1" runat="server">
    </telerik:RadEditor>
</div>
 
<telerik:RadButton runat="server" ID="RadButton1" Text="Toggle Visibility"
    OnClientClicked="OnClientClicked" AutoPostBack="false">
</telerik:RadButton>
 
<script type="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>

1 Answer, 1 is accepted

Sort by
0
RJ
Top achievements
Rank 1
answered on 19 Sep 2015, 04:30 PM
Nevermind guys
Tags
Editor
Asked by
RJ
Top achievements
Rank 1
Answers by
RJ
Top achievements
Rank 1
Share this question
or