Hi.
I'd like to disable whole summernote textarea so user can only see whole HTML (email) code.
What I managed to do is this peace of code:
<div class="input-group">
<?php $name="mBody"?><textarea disabled="disabled" id="<?=$name?>" name="<?=$name?>" class="form-control"><?=$FORMS[$name]?></textarea>
</div>
<script>
$("#mBody").summernote({ disableDragAndDrop: true, airPopover : []});
$(".note-toolbar").remove();
$( window ).resize(function() {
$(".note-editor").width($(".note-editor").parent().parent().width());
});
$(window).trigger('resize');
</script>
Still I can't get rid of note-popover appearing when user click on images or links.
Any idea?
@chrismaliszewski Thanks for reporting.
I made a little patch for disabling popover after initializing summernote with no buttons at develop branch. This will be released at v0.7.0.
$('.summernote').summernote({
height: 300,
popover: {
image: [],
link: [],
air: []
}
});
But I thought This way isn't good for disable editor. We suggest destroy summernote for disable editor now.
http://summernote.org/#/example#click2edit
I had the same problem yesterday too... 10-16-2018... the solution did work but why do we have to deal with that?? :-(
where do we have to paste this code snippet to,i mean which file name
$('.summernote').summernote({
height: 300,
popover: {
image: [],
link: [],
air: []
}
});
I have this:
popover: {
image: [],
},
and yet all the popovers are disabled. How do we just disable ONE?
Editing to add I'm using version 0.8.12 and loading the bs4 js.
Most helpful comment
@chrismaliszewski Thanks for reporting.
I made a little patch for disabling popover after initializing summernote with no buttons at develop branch. This will be released at v0.7.0.
But I thought This way isn't good for disable editor. We suggest destroy summernote for disable editor now.
http://summernote.org/#/example#click2edit