Mercurial Hosting > sceditor
diff src/formats/bbcode.js @ 26:160be99e1517
remove bbcode call
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 09 Aug 2022 23:30:24 -0600 |
parents | 80bf0adc9efd |
children | 8165b83907af |
line wrap: on
line diff
--- a/src/formats/bbcode.js Tue Aug 09 23:15:58 2022 -0600 +++ b/src/formats/bbcode.js Tue Aug 09 23:30:24 2022 -0600 @@ -634,8 +634,7 @@ }, isInline: false, quoteType: QuoteType.never, - format: function (element, content) { -console.log('a'); + format: function (element, content, bbcodeFormat) { var authorAttr = 'data-author'; var author = ''; var cite; @@ -657,8 +656,7 @@ element.removeChild(cite); } -console.log('qqq'); - content = this.elementToBbcode(element); + content = bbcodeFormat.elementToBbcode(element); author = '=' + author.replace(/(^\s+|\s+$)/g, ''); if (cite) { @@ -1825,8 +1823,7 @@ token.attrs ); } else { - html = bbcode.html.call( - base, + html = bbcode.html( token, token.attrs, content @@ -2405,7 +2402,7 @@ format = bbcodeHandlers[bbcode].format; if (isFunction(format)) { - content = format.call(base, element, content); + content = format(element, content, base); } else { content = _formatString(format, content); }