Content deleted Content added
Polygnotus (talk | contribs) No edit summary |
Polygnotus (talk | contribs) No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 160:
templateTools[buttonId] = {
type: 'element',
element:
function() { $(this).
.click((function(syntax)
e.preventDefault();
// Get the textarea
Line 187:
const end = textarea.selectionEnd;
const text = textarea.value;
textarea.value = text.substring(0, start) +
// Move cursor to end of inserted text
textarea.selectionStart = textarea.selectionEnd = start +
textarea.focus();
}
}
})(templateSyntax))
};
}
|