support unicode in button names, closes #1250

pull/255/head
zadam 2020-09-17 14:41:00 +07:00
parent 6220b02ef0
commit c371873b7e
1 changed files with 1 additions and 1 deletions

@ -87,7 +87,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
* @param {ToolbarButtonOptions} opts
*/
this.addButtonToToolbar = opts => {
const buttonId = "toolbar-button-" + opts.title.replace(/[^a-zA-Z0-9]/g, "-");
const buttonId = "toolbar-button-" + opts.title.replace(/\s/g, "-");
const button = $('<button>')
.addClass("btn btn-sm")