zoukankan      html  css  js  c++  java
  • 织梦ckeditor编辑器 通过修改js去除img标签内的width和height样式

    1. 文件includeckeditorpluginsimagedialogsimage.js

    2. 使用工具美化js代码

    3. 搜索 setStyle('width', CKEDITOR.tools.cssLength

    找到下面设置width的代码并注释掉

    if (C == d) {
        if (F) D.setStyle('width', CKEDITOR.tools.cssLength(F));
        else D.removeStyle('width');
        !E && D.removeAttribute('width');
    } else if (C == f) {
        var G = F.match(h);
        if (!G) {
            var H = this.getDialog().originalElement;
            if (H.getCustomData('isReady') == 'true') D.setStyle('width', H.$.width + 'px');
        } else D.setStyle('width', CKEDITOR.tools.cssLength(F));
    } else if (C == g) {
        D.removeAttribute('width');
        D.removeStyle('width');
    }

    4. 搜索 setStyle('height', CKEDITOR.tools.cssLength

    找到下面设置height的代码并注释掉

    if (C == d) {
        if (F) D.setStyle('height', CKEDITOR.tools.cssLength(F));
        else D.removeStyle('height');
        !E && D.removeAttribute('height');
    } else if (C == f) {
        var G = F.match(h);
        if (!G) {
            var H = this.getDialog().originalElement;
            if (H.getCustomData('isReady') == 'true') D.setStyle('height', H.$.height + 'px');
        } else D.setStyle('height', CKEDITOR.tools.cssLength(F));
    } else if (C == g) {
        D.removeAttribute('height');
        D.removeStyle('height');
    }
  • 相关阅读:
    eclipse如何添加User Library
    Json字符串取值
    日常发现的小工具
    java获取json数组格式中的值
    每日总结一个面试题
    linux下备份还原mysql某个库(完整版)
    linux下安装zookeeper教程
    redis安装及常用命令
    dubbo-admin安装使用
    前端框架 一周使用经验积累
  • 原文地址:https://www.cnblogs.com/bubuchu/p/8522420.html
Copyright © 2011-2022 走看看