-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
custom link popover? #2534
Copy link
Copy link
Closed
Description
How to add a custom button on link popover?
steps to reproduce
I try to add a custom button on link popover
just simple modify example from
https://summernote.org/deep-dive/#using-button-with-options
https://summernote.org/deep-dive/#initialization-options
var HelloButton = function (context) {
var ui = $.summernote.ui;
// create button
var button = ui.button({
contents: '<i class="fa fa-child"/> Hello',
tooltip: 'hello',
click: function () {
// invoke insertText method with 'hello' on editor module.
context.invoke('editor.insertText', 'hello');
}
});
return button.render(); // return button as jquery object
} $(document).ready(function() {
$('#summernote').summernote({
popover: {
link: [
['custom', ['HelloButton']],
['link', ['HelloButton', 'linkDialogShow']]
]
}
});
});https://jsfiddle.net/1Lwcahbk/
browser version and os version and summernote version
What is your browser and OS?
win7 chrome (electron)
What is your summernote version?
v0.8.8
screenshot of issue
Where is my custom button?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
