Мне удается создать пользовательскую кнопку.Но я не могу найти, как создать настраиваемое диалоговое окно для добавления пользовательского ввода
Это мой текущий код для простой настраиваемой кнопки:
summernoteConf = {
popover: {
image: [
['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],
['float', ['floatLeft', 'floatRight', 'floatNone']],
['remove', ['removeMedia']]
],
link: [
['link', ['linkDialogShow', 'unlink']]
],
air: [
['color', ['color']],
['font', ['bold', 'underline', 'clear']],
['para', ['ul', 'paragraph']],
['table', ['table']],
['insert', ['link', 'picture']]
]
},
placeholder: '',
tabsize: 2,
height: 100,
buttons: {},
toolbar: [
['mybutton', ['hello']],
// [groupName, [list of button]]
['misc', ['codeview', 'undo', 'redo']],
['style', ['bold', 'italic', 'underline', 'clear']],
['font', ['bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'clear']],
['fontsize', [ 'fontsize', 'color']],
['para', ['style0', 'ul', 'ol', 'paragraph', 'height']],
['insert', ['table', 'picture', 'link', 'video', 'hr']]
]
};
ngOnInit(){
var HelloButton = function (context) {
var ui = ($ as any).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
}
this.summernoteConf.buttons = {
hello: HelloButton
};
}
Теперь я хочу иметь диалоговое окноввод, чтобы добавить пользовательский ввод в моем HelloButton.Как я могу это сделать?