Compare commits

..

No commits in common. "1fe978703f31a55d355ffbb9064d57b9bd101a79" and "92e2171bc85b3efebe251b31ed19a4a872f9d295" have entirely different histories.

View File

@ -338,17 +338,14 @@ var templates = {
// nested button...
var nested_button
header = header
.trim()
.replace(/\[([^\]]*)\]/g,
function(_, text){
nested_button = true
return `<button class="template-action">${
text.trim()
}</button>` })
return `<button>${ text.trim() }</button>` })
// whole text is a button...
if(!nested_button){
header =
`<button class="template-action">${
`<button>${
header.trim() == '' ?
this.__default_button_text__
: header.trim()
@ -371,8 +368,6 @@ var templates = {
while(e.tagName != 'BUTTON'
&& e.parentElement != null){
e = e.parentElement }
if(!e.classList.contains('template-action')){
return }
if(e.tagName == 'BUTTON'){
// get template data...
var data = editor.data(elem)