.fck编辑器插入图片去掉默认的width和height属性的处理方法,打开文件 fckeditor/editor/dialog/fck_image/fck_images.js找到对应的代码段即可处理了.
打开文件 fckeditor/editor/dialog/fck_image/fck_images.js,注释以下代码即可,代码如下:
if ( oImage.style.width )
{
var aMatchW = oImage.style.width.match( regexSize ) ;
if ( aMatchW )
{
iWidth = aMatchW[1] ;
oImage.style.width = '' ;
SetAttribute( oImage, 'width' , iWidth ) ;
}
}
if ( oImage.style.height )
{
var aMatchH = oImage.style.height.match( regexSize ) ;
if ( aMatchH )
{
iHeight = aMatchH[1] ;
oImage.style.height = '' ;
SetAttribute( oImage, 'height', iHeight ) ;
———-
var e = dimension == 'Width' ? GetE('txtHeight') : GetE('txtWidth') ;
———-
if ( dimension == 'Width' )
value = value == 0 ? 0 : Math.round( oImageOriginal.height * ( value / oImageOriginal.width ) ) ;
else //开源软件:Cuoxin.com
value = value == 0 ? 0 : Math.round( oImageOriginal.width * ( value / oImageOriginal.height ) ) ;
———-
GetE('txtWidth').value = oImageOriginal.width ;
GetE('txtHeight').value = oImageOriginal.height ;
———-
GetE('txtWidth').value = width ? width : '' ;
GetE('txtHeight').value = height ? height : '' ;
.fck编辑器加入图片去掉默认的width和height属性的方法
.fck编辑器插入图片去掉默认的width和height属性的处理方法,打开文件 fckeditor/editor/dialog/fck_image/fck_images.js找到对应的代码段即可处理了. 打开文件 fckeditor/editor/dialog/fck_image/fck_images.js,注释以下代码即可,代码如下: if ( oImage.st
本文来自网络,不代表站长网立场,转载请注明出处:https://www.zwzz.com.cn/html/jianzhan/jy/2021/1215/37288.html