如何从TinyMce编辑器中删除第一个nbsp?

时间:2018-11-02 07:44:31

标签: javascript tinymce

我有问题。编辑页面时,我有: <p>&nbsp;</p>在编辑器上。当我删除空行并保存时,没关系,我有这个空行。我该如何解决?我的配置:

editor.remove();
  editor = null;
  tinymce.suffix = '.min';
  tinymce.init({
    selector: 'textarea.richTextBox',
    language: 'ru',
    // skin: 'voyager',
    min_height: 600,
    resize: 'vertical',
    plugins: 'print preview fullpage searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists textcolor wordcount imagetools contextmenu colorpicker textpattern code',
    extended_valid_elements: 'input[id|name|value|type|class|style|required|placeholder|autocomplete|onclick]',
    file_browser_callback: function (field_name, url, type, win) {
        if (type == 'image') {
            $('#upload_file').trigger('click');
        }
    },
    toolbar: 'styleselect bold italic underline | forecolor backcolor | alignleft aligncenter alignright | bullist numlist outdent indent | link image table youtube giphy | removeformat | fullscreen | code',
    convert_urls: false,
    image_caption: true,
    image_title: true,

示例:

Example image of problem

0 个答案:

没有答案