Mercurial Hosting > sceditor
comparison 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 |
comparison
equal
deleted
inserted
replaced
25:80bf0adc9efd | 26:160be99e1517 |
---|---|
632 tags: { | 632 tags: { |
633 blockquote: null | 633 blockquote: null |
634 }, | 634 }, |
635 isInline: false, | 635 isInline: false, |
636 quoteType: QuoteType.never, | 636 quoteType: QuoteType.never, |
637 format: function (element, content) { | 637 format: function (element, content, bbcodeFormat) { |
638 console.log('a'); | |
639 var authorAttr = 'data-author'; | 638 var authorAttr = 'data-author'; |
640 var author = ''; | 639 var author = ''; |
641 var cite; | 640 var cite; |
642 var children = element.children; | 641 var children = element.children; |
643 | 642 |
655 | 654 |
656 if (cite) { | 655 if (cite) { |
657 element.removeChild(cite); | 656 element.removeChild(cite); |
658 } | 657 } |
659 | 658 |
660 console.log('qqq'); | 659 content = bbcodeFormat.elementToBbcode(element); |
661 content = this.elementToBbcode(element); | |
662 author = '=' + author.replace(/(^\s+|\s+$)/g, ''); | 660 author = '=' + author.replace(/(^\s+|\s+$)/g, ''); |
663 | 661 |
664 if (cite) { | 662 if (cite) { |
665 element.insertBefore(cite, element.firstChild); | 663 element.insertBefore(cite, element.firstChild); |
666 } | 664 } |
1823 html = formatBBCodeString( | 1821 html = formatBBCodeString( |
1824 bbcode.html, | 1822 bbcode.html, |
1825 token.attrs | 1823 token.attrs |
1826 ); | 1824 ); |
1827 } else { | 1825 } else { |
1828 html = bbcode.html.call( | 1826 html = bbcode.html( |
1829 base, | |
1830 token, | 1827 token, |
1831 token.attrs, | 1828 token.attrs, |
1832 content | 1829 content |
1833 ); | 1830 ); |
1834 } | 1831 } |
2403 return; | 2400 return; |
2404 } | 2401 } |
2405 | 2402 |
2406 format = bbcodeHandlers[bbcode].format; | 2403 format = bbcodeHandlers[bbcode].format; |
2407 if (isFunction(format)) { | 2404 if (isFunction(format)) { |
2408 content = format.call(base, element, content); | 2405 content = format(element, content, base); |
2409 } else { | 2406 } else { |
2410 content = _formatString(format, content); | 2407 content = _formatString(format, content); |
2411 } | 2408 } |
2412 return false; | 2409 return false; |
2413 }); | 2410 }); |