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

How to set border off by default? (Toggle border )

10 Answers 301 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Vincent
Top achievements
Rank 1
Vincent asked on 30 Jun 2010, 10:46 PM
Thanks

10 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 01 Jul 2010, 06:54 AM
Hello Vincent,

#1:
You can easily remove the border from the RadEditor by setting the BorderStyle property to "None".

#2:
Also the CSS has same effect:
 
    <style type="text/css"
        .Default.reWrapper 
        { 
            bordernone !important; 
        } 
    </style> 

#3:
If you want to toggle this property from client side, then use the following code:
 
    function setBorder() { 
        var editor = $find('<%= RadEditor1.ClientID %>'); 
        editor.get_element().style.borderStyle = "none"
    } 
 


-Shinu.
0
Vincent
Top achievements
Rank 1
answered on 01 Jul 2010, 08:35 AM
Hi Shinu,

I mean the "Toggle table Border"  functionality. Basically, by default the radeditor will enable "table border", what I want to do is to turn off it

Thanks
0
Accepted
Rumen
Telerik team
answered on 01 Jul 2010, 08:46 AM
Hello Vincent,

You can turn off the table border by executing the ToggleTableBorder command when the editor is loaded and when switching from Preview or HTML mode to Design mode, e.g.

<script type="text/javascript">
    function OnClientLoad(editor) {
        editor.fire("ToggleTableBorder");
    }
    function OnClientModeChange(editor) {
        var mode = editor.get_mode();
        switch (mode) {
            case 1:
                editor.fire("ToggleTableBorder");
                break;
        }
    }   
 
</script>
 
<telerik:RadEditor ID="RadEditor1"
    OnClientLoad="OnClientLoad"
    OnClientModeChange="OnClientModeChange"
    runat="server">
</telerik:RadEditor>



Greetings,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Vincent
Top achievements
Rank 1
answered on 01 Jul 2010, 11:48 AM
That's exactly what I need.

Thanks for your support.
0
armadillo.mx
Top achievements
Rank 1
answered on 30 Nov 2010, 07:10 PM
Thank you! I needed this too
0
J2K
Top achievements
Rank 1
answered on 19 Oct 2011, 12:16 AM
You're joking, yes? This is the only way of toggling the visibility of the ugly borders RadEditor automatically imposes on tables? Bizarre. Radcontrols used to be very helpful, now one has to waste half a day or more to figure out something which should be straight forward. Kind of like the message at the top of this page "Before posting make sure your project is using the exact same RadControl version as the one in this thread. This is an old post and the information may be outdated." To do this, I would have to go back to the previous page,  Which I did. Which of course means I loose what I had already written here. Oh, by the way, there is NO MENTION OF WHICH OF THE GAZILLION VERSIONS the writer is referring to in this post. 
0
Rumen
Telerik team
answered on 20 Oct 2011, 10:37 AM
Hello J2k,

If you do not like the borders you can remove them completely or customize them by setting the ContentAreaCssFile property or the CssFiles property to point to your css file.

Regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
An
Top achievements
Rank 1
answered on 11 Jun 2015, 11:44 AM

Shinu,

 The dotted lines still show when I created a table with border="0".  I used option #1 and #3.  The <style> option does not work with my master page.

 

Any other suggestion?

 

Thanks.

An

0
Ianko
Telerik team
answered on 16 Jun 2015, 05:21 AM

Hi An,

The suggestions you have tried are to remove the border of the content area, not the dotted borders of the table elements inside.

If you need to toggle the tables' borders, you should follow the other suggestions from Rumen's posts:

Regards,

Ianko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
An
Top achievements
Rank 1
answered on 16 Jun 2015, 11:20 AM

Ianko,

That works for me. 

Thanks.

Tags
Editor
Asked by
Vincent
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Vincent
Top achievements
Rank 1
Rumen
Telerik team
armadillo.mx
Top achievements
Rank 1
J2K
Top achievements
Rank 1
An
Top achievements
Rank 1
Ianko
Telerik team
Share this question
or