PLUGINS: Uncaught Error: TOOLTIP: Option "container" provided type "undefined" but expected type "(string|element|boolean)".
steps to reproduce
- Include summernote
- Include plugin: specialchars
- Add specialchars to toolbar
browser version and os version and summernote version
OS: OSX High Sierra Browser: Chrome 64.0.3282.186 (Official Build) (64-bit) Summernote: 0.8.10 (bs4)
When attempting to use the specialchars plugin, I get the error in the Issue title, and the button doesn't render. Looking at the code, it appears that this plugin (and the others included) is calling ui.button incorrectly. Changing the block at line 67 to read
context.memo('button.specialchars', function() {
return ui.button(
$,
{
container: options.container,
contents: '<i class="fa fa-font fa-flip-vertical">',
tooltip: lang.specialChar.specialChar,
click: function() {
self.show();
}
}
).render();
});
After this, the plugin appears to work, but does provide another error: No method named "destroy". Changing (after the above changes) line 301 to read
self.$dialog.find('button').tooltip('hide');
appears to resolve this as well.
The reasons I don't simply submit a pull request are that
- I don't have a tremendous understanding of this repo, as I just started using it
- I don't know how to unit-test javascript
- I can't guarantee that nothing else breaks
I am facing same problem. Can anyone solve this issue?
Same here...
Found this issue from googling the error message - not a summernote user.
I was upgrading my project to bootstrap 4.1.0 from 4.0.0-beta2. Bootstrap uses a library called Popper, which is what is throwing the error. This was caused in my project because I wasn't providing a title to a popover.
Try adding a "title" property to that object you're passing to ui.button() (ie. as a sibling to "tooltip", "contents", etc.)
var button = ui.button({
contents: '<i class="fa fa-child"/> Hello',
container: false, //add option
tooltip: 'hello',
click: function () {
// invoke insertText method with 'hello' on editor module.
context.invoke('editor.insertText', 'hello');
}
});
@KarmicXKoala try set title like this ({ title: lang.specialChar.specialChar || '' })
I had the same problem. Adding container: false to the object for ui.button() fixed it.