Heim  >  Fragen und Antworten  >  Hauptteil

javascript – So entfernen Sie Tags im Baidu-Ueditor

Der ueditor von Baidu fügt dem Inhalt automatisch P-Tags hinzu. Online kann man nichts finden

滿天的星座滿天的星座2709 Tage vor602

Antworte allen(2)Ich werde antworten

  • 世界只因有你

    世界只因有你2017-05-19 10:22:44

    用jq吧,如果要全部去掉的话:

    $("p").each(function(){
        var xx=$(this).html();
        $(this).replaceWith(xx);
     })

    Antwort
    0
  • 阿神

    阿神2017-05-19 10:22:44

    有对应的获取纯文本的方法:ueditor.getContentTxt()

    演示 demo 里面都展示了常用的方法。

    Antwort
    0
  • StornierenAntwort