source: extensions/FCKEditor/editor/css/behaviors/showtableborders.htc @ 3295

Last change on this file since 3295 was 3295, checked in by patdenice, 15 years ago

New extension added:
FCK Editor (2.0.a)

File size: 822 bytes
Line 
1<public:component lightweight="true">
2
3<public:attach event="oncontentready" onevent="ShowBorders()" />
4<public:attach event="onpropertychange" onevent="OnPropertyChange()" />
5
6<script language="javascript">
7
8var oClassRegex = /\s*FCK__ShowTableBorders/ ;
9
10function ShowBorders()
11{
12        if ( this.border == 0 )
13        {
14                if ( !oClassRegex.test( this.className ) )
15                        this.className += ' FCK__ShowTableBorders' ;
16        }
17        else
18        {
19                if ( oClassRegex.test( this.className ) )
20                {
21                        this.className = this.className.replace( oClassRegex, '' ) ;
22                        if ( this.className.length == 0 )
23                                this.removeAttribute( 'className', 0 ) ;
24                }
25        }
26}
27
28function OnPropertyChange()
29{
30        if ( event.propertyName == 'border' || event.propertyName == 'className' )
31                ShowBorders.call(this) ;
32}
33
34</script>
35
36</public:component>
Note: See TracBrowser for help on using the repository browser.