Mercurial Hosting > sceditor
diff src/formats/bbcode.js @ 24:80a86fb8f2b7
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 09 Aug 2022 22:49:59 -0600 |
parents | 1334920263a2 |
children | 80bf0adc9efd |
line wrap: on
line diff
--- a/src/formats/bbcode.js Tue Aug 09 13:25:17 2022 -0600 +++ b/src/formats/bbcode.js Tue Aug 09 22:49:59 2022 -0600 @@ -635,6 +635,7 @@ isInline: false, quoteType: QuoteType.never, format: function (element, content) { +console.log('a'); var authorAttr = 'data-author'; var author = ''; var cite; @@ -656,6 +657,7 @@ element.removeChild(cite); } +console.log('qqq'); content = this.elementToBbcode(element); author = '=' + author.replace(/(^\s+|\s+$)/g, ''); @@ -2496,20 +2498,20 @@ * Initializer * @private */ - base.init = function () { - base.opts = this.opts; + base.init = function (editor) { + base.opts = editor.opts; base.elementToBbcode = elementToBbcode; // build the BBCode cache buildBbcodeCache(); - this.commands = extend( - true, {}, defaultCommandsOverrides, this.commands + editor.commands = extend( + true, {}, defaultCommandsOverrides, editor.commands ); // Add BBCode helper methods - this.toBBCode = base.toSource; - this.fromBBCode = base.toHtml; + editor.toBBCode = base.toSource; + editor.fromBBCode = base.toHtml; }; /**