[nodebb-plugin-bbcodes] BBCodes Plugin (v2.0)

NodeBB Plugins
  • Major update to version 2.0:

    Note: I've spend last two days to fix most (i hope) of bugs, but there are still can be some, especially related to conflicts with styles/themes. I'm not a designer, but i'll try to fix them as soon as you report

    • Reworked parser architecture to callback mechanism
    • Extended hook table, so bbcodes can now process 4 requests (get, create, edit, render) so they can define more complex behavior
    • Extended parser to support custom multiargument format ([tag:name=value;name2=value2]...[/tag])
    • Integrated WysiBB composer (http://www.wysibb.com/)
    • Added many new bbcodes to match WysiBB existing codes
    • [spoiler] integrated into the core
    • Old bbcode plugins are not supported
    • Added [aspoiler] tag - Ajax Spoiler, first one wich use new exntended processing mechanism

    Composer preview:
    WysiBB Composer

    Ajax spoiler tag:
    Spoiler content is loaded only when button is clicked. Note, that after you save the post first time, each aspoiler tag will have it's own id. Don't remove or change it manually or you will loose it's content.

    Syntax example:

    [aspoiler]Something![/aspoiler] - default

    [aspoiler:name=Spoiler Name!]Content[/aspoiler] - named spoiler

    [aspoiler:name=Spoiler Name!;id=1234]Content[/aspoiler] - this is what you will see, when you'll try to edit it.

    Perview GIF: http://i.imgur.com/IioJxsk.gifv

    You can report issues here or on github (https://github.com/APXEOLOG/nodebb-plugin-bbcodes/issues)

    As usual you can test this plugin on my forum: http://forum.apxeolog.com/topic/7/bbcode-test (guests are able to write there)

    To install do npm install nodebb-plugin-bbcodes

    Plugin repo:
    https://github.com/APXEOLOG/nodebb-plugin-bbcodes

    Also i've made example extension plugin:
    https://github.com/APXEOLOG/nodebb-plugin-bbcodes-spoiler

    For detailed information & usage examples you can watch my forum: http://forum.apxeolog.com/topic/8/nodebb-bbcode-plugin

  • Brilliant!

  • Hey! I love your plugin. I noticed you didn't have buttons added to the composer and so I wrote them myself. I made a fork and submitted a pull request, let me know what you think?

  • That's pretty nice, thx! I'll merge it as soon as possible.

  • Nice work! 🙂

  • Nice Work! Update planned?

  • Any option to make it compatible with markdown?

  • Hello! I'm currently thinking about how to make it fit into new redactor etc, but i will definetly update it.

    Any features you want to be added?

  • I would love redactor support and being able to extend that!

  • Redactor doesn't output to markdown or bbcode, so compatibility would not really be possible in that sense...

    Unless you meant a way to turn off HTML sanitization in BBCode, in which case that's as much as you can do.

  • i've updated plugin

    Version 1.3 Changelog:

    • Minor fixes (composer buttons integration)
    • Now it can be used with markdown plugin & (partially) with new redactor composer

    To use with markdown or/and redactor composer:

    • Go to Admin Panel -> Installed Plugins -> BBCodes and disable HTML Sanitization
    • You may also want to disable 'Autoconvert url-like texts to links' option in markdown settings, otherwise url-based bbcode tags will not work

    Composer preview:
    There is no composer preview and i don't think i going to add it. If you turn on markdown, you will see it's preview

    New redactor composer:
    There is no buttons and preview for bbcodes, but they will work if you'll type them manually

  • Major update to version 2.0:

    Note: I've spend last two days to fix most (i hope) of bugs, but there are still can be some, especially related to conflicts with styles/themes. I'm not a designer, but i'll try to fix them as soon as you report

    • Reworked parser architecture to callback mechanism
    • Extended hook table, so bbcodes can now process 4 requests (get, create, edit, render) so they can define more complex behavior
    • Extended parser to support custom multiargument format ([tag:name=value;name2=value2]...[/tag])
    • Integrated WysiBB composer (http://www.wysibb.com/)
    • Added many new bbcodes to match WysiBB existing codes
    • [spoiler] integrated into the core
    • Old bbcode plugins are not supported
    • Added [aspoiler] tag - Ajax Spoiler, first one wich use new exntended processing mechanism

    Composer preview:
    You should disable all composer plugins except bbcodes to make it work.
    WysiBB Composer

    Ajax spoiler tag:
    Spoiler content is loaded only when button is clicked. Note, that after you save the post first time, each aspoiler tag will have it's own id. Don't remove or change it manually or you will loose it's content.

    Syntax example:

    [aspoiler]Something![/aspoiler] - default

    [aspoiler:name=Spoiler Name!]Content[/aspoiler] - named spoiler

    [aspoiler:name=Spoiler Name!;id=1234]Content[/aspoiler] - this is what you will see, when you'll try to edit it.

    Perview GIF: http://i.imgur.com/IioJxsk.gifv

    You can report issues here or on github (https://github.com/APXEOLOG/nodebb-plugin-bbcodes/issues)

    As usual you can test this plugin on my forum: http://forum.apxeolog.com/topic/7/bbcode-test (guests are able to write there)

  • very cool update
    some things i got after a few tests on safari

    • enabling some styles like bold and italic and disable them will make to show them as enable afterwards eventually, a bit messy
    • i got locked and didn't allow me for new text line some times
  • @exodo said:

    very cool update
    some things i got after a few tests on safari

    • enabling some styles like bold and italic and disable them will make to show them as enable afterwards eventually, a bit messy
    • i got locked and didn't allow me for new text line some times

    Can you give me some steps to reproduce #2?

  • @APXEOLOG said:

    @exodo said:

    very cool update
    some things i got after a few tests on safari

    • enabling some styles like bold and italic and disable them will make to show them as enable afterwards eventually, a bit messy
    • i got locked and didn't allow me for new text line some times

    Can you give me some steps to reproduce #2?

    tested it again
    write some words > press return > it will create new empty line but you will stay on first
    you can go down with down arrow but is strange behavior

  • There is a problem with composing new topics (I have attached a screenshot for reference)

    Screen Shot 2015-08-12 at 12.20.32 AM.png

  • @exodo said:

    tested it again
    write some words > press return > it will create new empty line but you will stay on first
    you can go down with down arrow but is strange behavior

    Lol, i've spend a lot of time to track this, since it is OK on my local dev forum. Just turned sanitization on and everything become ok.

  • Is it correct that this plugin removes the ability to upload files and display files ?

  • @robert said:

    Is it correct that this plugin removes the ability to upload files and display files ?

    Mm i think you cannot upload files right now. What do you mean with 'display'?

  • With the inbuilt composer it's possible to upload a file and then reference it in markdown.

    I see that's not possible in BBCodes Plugin.

    One other problem I have encountered is that when I installed the latest version I did not get a BBCode button bar at the top of composer and was unable to submit posts.

    Edit: I have now been able to fix that problem and have recreated the steps that causes it.
    If you install the BBCodes plugin and deactivate the composer and markdown plugins there is no issue. If you uninstall the composer and markdown plugins then the BBCode plugin seems to have issues. Perhaps it's localised to my installation but maybe others have the issue.


Suggested Topics


  • 0 Votes
    2 Posts
    309 Views
  • 1 Votes
    2 Posts
    363 Views
  • 0 Votes
    1 Posts
    395 Views
  • 3 Votes
    13 Posts
    4045 Views
  • 0 Votes
    12 Posts
    4319 Views