【问题标题】:Summernote Add Function when inserting tableSummernote 插入表格时添加功能
【发布时间】:2018-01-07 03:09:05
【问题描述】:

当我在 Summernote 中插入表格时,我正在尝试在表格中应用 Resizable 函数。有什么办法吗?

【问题讨论】:

  • 你试过什么?
  • 我尝试在页面启动时添加一个函数,但可调整大小的函数需要编辑器中存在一个表格。

标签: javascript jquery summernote


【解决方案1】:

幸运的是,这对我有用,

this.insertTable = this.wrapCommand(function (dim) {
        var dimension = dim.split('x');
        var rng = this.createRange().deleteContents();
        rng.insertNode(table.createTable(dimension[0], dimension[1], options));
        $('.note-editable table').resizable({
            handles: "n, w, e, s"
        });
        $('.note-editable td').resizable({
            handles: "e, s"
        });
    });

【讨论】:

    猜你喜欢
    • 2016-07-04
    • 1970-01-01
    • 2019-08-14
    • 1970-01-01
    • 2018-04-29
    • 1970-01-01
    • 1970-01-01
    • 2012-08-08
    • 2021-05-27
    相关资源
    最近更新 更多