view wiki/htdocs/applets/FCKeditor/editor/css/behaviors/showtableborders.htc @ 4005:f5c322ae1c7b

add recent version of fckeditor 2.6.3
author Byeongweon [tasyblue@gmail.com]
date Mon, 11 Aug 2008 13:54:49 +0900
parents 6089ade226fb
children 07862b0663fd
line wrap: on
line source
<public:component lightweight="true">

<public:attach event="oncontentready" onevent="ShowBorders()" />
<public:attach event="onpropertychange" onevent="OnPropertyChange()" />

<script language="javascript">

var oClassRegex = /\s*FCK__ShowTableBorders/ ;

function ShowBorders()
{
	if ( this.border == 0 )
	{
		if ( !oClassRegex.test( this.className ) )
			this.className += ' FCK__ShowTableBorders' ;
	}
	else
	{
		if ( oClassRegex.test( this.className ) )
		{
			this.className = this.className.replace( oClassRegex, '' ) ;
			if ( this.className.length == 0 )
				this.removeAttribute( 'className', 0 ) ;
		}
	}
}

function OnPropertyChange()
{
	if ( event.propertyName == 'border' || event.propertyName == 'className' )
		ShowBorders.call(this) ;
}

</script>

</public:component>