Aloha Editor禁用图像裁剪

时间:2014-01-07 17:58:29

标签: javascript css aloha-editor

除了v​​is css之外,如何禁用图像插件工具栏中的裁剪按钮?配置不起作用。

Aloha.settings = {
    plugins: {
       image: {
              'maxWidth': 600,
              'minWidth': 3,
              'maxHeight': 200,
              'minHeight': 3,
              ui: {
                 oneTab      : false, //Place all ui components within one tab
                 insert      : true,
                 reset       : true,
                 aspectRatioToggle: true, // Toggle button for the aspect ratio
                 align       : true, // Menu elements to show/hide in menu
                 resize      : true, // Resize buttons
                 meta        : true,
                 margin      : false,
                 crop        : false,
                 resizable   : true, // Resizable ui-drag image
                 handles     : 'ne, se, sw, nw'
             }
        }
    }
}

1 个答案:

答案 0 :(得分:0)

好的,所以仍然不知道为什么配置不起作用并且通过css禁用裁剪按钮需要对代码进行大量更改(所有按钮需要再次定位)但是在 aloha.js (主脚本文件)中找到变量var defaultToolbarSettings,在图片设置下,从"imageCropButton"移除components

这样裁剪按钮就不会在DOM中呈现。

相关问题