Mercurial Hosting > sceditor
diff src/formats/bbcode.js @ 30:db061869f28f
remove sceditor.command, add options.onCreate
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 12 Aug 2022 00:54:39 -0600 |
parents | 8165b83907af |
children | c23475f3f466 |
line wrap: on
line diff
--- a/src/formats/bbcode.js Thu Aug 11 19:54:03 2022 -0600 +++ b/src/formats/bbcode.js Fri Aug 12 00:54:39 2022 -0600 @@ -23,11 +23,14 @@ var attr = dom.attr; var is = dom.is; var extend = utils.extend; + var extendDeep = utils.extendDeep; var each = utils.each; var EMOTICON_DATA_ATTR = 'data-sceditor-emoticon'; - var getEditorCommand = sceditor.command.get; + function getEditorCommand(cmd) { + return sceditor.commands[cmd]; + } var QuoteType = { /** @lends BBCodeParser.QuoteType */ @@ -2506,8 +2509,8 @@ // build the BBCode cache buildBbcodeCache(); - editor.commands = extend( - true, {}, defaultCommandsOverrides, editor.commands + editor.commands = extendDeep( + {}, defaultCommandsOverrides, editor.commands ); // Add BBCode helper methods