Plugin to let you preview BBcode?



  • Long story short I need to do a lot of editing in bbcode for a site, the site though is notorious for breaking your post when you try to code.

    I’ve been trying to find a place to edit my code on a local program/app on my machine to prevent losing work on the forum, so I was wondering if there was any kinda plugin for notepad++ to preview inputed BBcode I was trying to use this http://fenixproductions.dcmembers.com/bbc/

    But its proven to be a pain in my ass and wont properly launch currently.



  • If it were me wanting to preview BBCode, I would use the Preview HTML plugin, which by default renders HTML… But it allows you to define a filter to run an external converter to convert from language “X” to HTML. Thus, I’ve got mine set up to convert Markdown and Perl’s POD documentation-markup to HTML.

    ; Content of Filters.ini file
    [Markdown]
    Extension=.md .markdown
    Language=Markdown
    Command=c:\perl\site\bin\multimarkdown.bat "%1"
    [PerlPOD]
    Extension=.pm .pod .pl
    Language=Perl
    Command=c:\perl\bin\pod2html_clean.bat -css=c:\perl\bin\pod2html.css "%1"
    

    If you can find a BBCode to HTML converter (I did a quick google, and saw some promising links, but I know nothing about it, so cannot evaluate the converters themselves). On my computer, I would probably grab a Perl module that does the conversion, like HTML::BBCode or Parse::BBCode, write a quick script to use the perl module to convert a BBCode file to HTML, and use that converter script up as the Command in a PreviewHTML Filter Definition:

    [BBCode]
    Extension=.bbcode .bbc
    Language=BBCode
    Command=c:\batch\bbcode2html.bat "%1"
    

    (One caveat on the Preview HTML plugin: the Notepad++ Installer seems to think it’s an “unstable” plugin, and disables it every time NPP upgrades. However, I have never seen Preview HTML crash NPP, so I don’t know why the installer claims that it is unstable. It might be one of those situations, discovered recently, where an earlier plugin in your plugin list gets incorrectly blamed for a later plugin’s crash, but I have no way of proving that. I just move the PreviewHTML.dll back into the main plugins directory from plugins\disabled after every upgrade.)


Log in to reply