Custom toolbar with Summernote

in settings.js You have basic setting (with all features on): toolbar: [ [‘style’, [‘style’]], [‘font’, [‘bold’, ‘italic’, ‘underline’, ‘clear’]], [‘fontname’, [‘fontname’]], [‘color’, [‘color’]], [‘para’, [‘ul’, ‘ol’, ‘paragraph’]], [‘height’, [‘height’]], [‘table’, [‘table’]], [‘insert’, [‘link’, ‘picture’, ‘hr’]], [‘view’, [‘fullscreen’, ‘codeview’]], [‘help’, [‘help’]] ], indentation is in ‘paragraph’

Paste content as plain text in summernote editor

Use the onPaste Callback Use the onPaste option to define a callback that will strip the tags and manually insert the text. $editor.summernote({ onPaste: function (e) { var bufferText = ((e.originalEvent || e).clipboardData || window.clipboardData).getData(‘Text’); e.preventDefault(); document.execCommand(‘insertText’, false, bufferText); } }); Credit: https://github.com/summernote/summernote/issues/303 Solve Firefox Problems: You may still have problems with Firefox. If so, … Read more

Summernote image upload

I tested this code and Works Javascript <script> $(document).ready(function() { $(‘#summernote’).summernote({ height: 200, onImageUpload: function(files, editor, welEditable) { sendFile(files[0], editor, welEditable); } }); function sendFile(file, editor, welEditable) { data = new FormData(); data.append(“file”, file); $.ajax({ data: data, type: “POST”, url: “Your URL POST (php)”, cache: false, contentType: false, processData: false, success: function(url) { editor.insertImage(welEditable, url); … Read more

How to disable a ts rule for a specific line?

As of Typescript 2.6, you can now bypass a compiler error/warning for a specific line: if (false) { // @ts-ignore: Unreachable code error console.log(“hello”); } Note that the official docs “recommend you use [this] very sparingly”. It is almost always preferable to cast to any instead as that better expresses intent. Older answer: You can … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)