Summernote error while removing Bold

0

I'm using Summernote with these settings:

$('#editor1').summernote({
    toolbar: [
        ['custom', ['comment']],
        ['style', ['style']],
        ['font', ['bold', 'underline', 'clear']],
        ['fontname', ['fontname']],
        ['color', ['color']],
        ['para', ['ul', 'ol', 'paragraph']],
        ['table', ['table']],
        ['insert', ['link', 'picture', 'video', 'modalcomment']],
        ['view', ['fullscreen', 'codeview','help']]
    ],
    // popover
    popatmouse: true,
    popover: {
        image: [
            ['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],
            ['float', ['floatLeft', 'floatRight', 'floatNone']],
            ['remove', ['removeMedia']],
            ['custom', ['comment']]
        ],
        link: [
            ['link', ['linkDialogShow', 'unlink']]
        ],
        table: [
            ['add', ['addRowDown', 'addRowUp', 'addColLeft', 'addColRight']],
            ['delete', ['deleteRow', 'deleteCol', 'deleteTable']]
        ],
        air: [
            ['color', ['color']],
            ['font', ['bold', 'underline', 'clear']],
            ['para', ['ul', 'paragraph']],
            ['table', ['table']],
            ['insert', ['link', 'picture']]
        ]
    },
    disableDragAndDrop: true,
    lang: 'pt-br',
    tabsize: 2,
    height: 650,
    dialogsInBody: true,
    codemirror: { // codemirror options
        theme: 'monokai'
    },
    callbacks: {
        onImageUpload: function (image) {
            uploadImage(image[0]);
        },
        onKeyup: function () {
            window.sessionStorage.setItem('conteudo', $('#editor1').summernote('code'));
            window.sessionStorage.setItem('id', $('#conteudo--id').attr('data-id'));
        }
    }
});

But for some reason the bold button is not working to remove the style it adds, any idea what it might be?

    
asked by anonymous 17.04.2018 / 21:42

1 answer

0

The problem was found, what happened was the CSS of the page where I defined the font-weight different from the default, so when adding a css:

b {
    font-weight: 700;
}

summernote was able to identify the portions of the text that were in bold.

    
20.04.2018 / 15:59