Answer the question
In order to leave comments, you need to log in
Is it possible to insert the meteor template into the summernote editor?
I have a standard custom button that inserts html code into the editor field:
var HelloButton = function (context) {
var ui = $.summernote.ui;
var button = ui.button({
contents: 'Insert HTML',
click: function () {
var node = document.createElement('span');
node.innerHTML = '{{>myTemplate}}'
context.invoke('editor.insertNode', node);
},
});
return button.render();
}
<template name="myTemplate">
<h2>some custom HTML code here</h2>
</template>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question