【问题标题】:Bootstrap wysihtml5 show extra stringsBootstrap wysihtml5 显示额外的字符串
【发布时间】:2015-10-18 15:47:04
【问题描述】:

我正在使用bootstrap-wysihtml5 编辑器。在我的网络上,它运行良好。但是当我使用 jquery 将数据从它发送到 php 时,它会发送一些额外的数据。例如:

当我发送这个时:

product two

它发送以下内容:

product+two%3Cbr%3E

我的 Bootstrap wysihtml5 配置在这里:

$('#form').wysihtml5({
    image: false
});

我的 jquery ajax 代码在这里:

$.ajax({
    url: "index.php",
    type: 'POST',
    dataType: 'html',
    data: {
        contentEdit: $('#form').serialize()
    },
    success: function(data) {
        alert('something ...');
    }
});

避免这种情况的程序是什么?

【问题讨论】:

  • 嗨,我想知道这个。
  • 看起来它只是对数据进行 url 编码。您可能需要在服务器上对其进行 url 解码。

标签: javascript php jquery regex bootstrap-wysiwyg


【解决方案1】:

实际上问题是我在一页中使用了多个表单。否则它会在一个框架内工作,这意味着当我们集成 Bootstrap wysihtml5 时,它是通过 iframe 嵌入的。最终我通过使用ckeditor 解决了这个问题。它更加灵活且易于使用。要轻松使用它,您可以遵循其 API 文档。谢谢大家。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-04-17
    • 1970-01-01
    • 1970-01-01
    • 2022-01-14
    • 1970-01-01
    • 2015-01-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多