Skip to content

BBCode plugin for Mantis BugTracker 1.3 and 2.x

License

Notifications You must be signed in to change notification settings

mantisbt-plugins/BBCodePlus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BBCodePlus

Description

BBCode plugin for Mantis BugTracker 2.x

Incorporates the following configurable features:

  • Editor with toolbars and preview (using jQuery MarkItUp).
  • BBCode processing.
  • Syntax Highlighting (using prismjs).
  • Mostly compatible with the Mantis Formatting plugin (this means they can both be enabled, if desired).
  • NOTE: This plugin does NOT interact well with the Markdown Processing feature of the Mantis Formatting plugin. Disabling the functionality is advised.

Repository Information

NOTE: BBCodePlus 2.x is now the master for the BBCodePlus project. Please re-fork or (carefully) update your fork (branch structure on upstream and origin).

BranchDescription
masterSupport for MantisBT 2.x (current production version).
master-1.3.xSupport for MantisBT 1.3.x (legacy).

Contributing to BBCodePlus

If you would like to contribute to BBCode plus, please read this guide first.

Change Log

2.1.19

  • Corrected issue with clipboard js script not being referenced properly on some mantis installs.

2.1.18

  • Added nonce random token and directives for included js scripts in order to hopefully address CSP restrictions.
  • Corrected issue with referencing issue images (removed volatile token, now using only file id and type).

2.1.17

  • Fixed styling and scripting issues with issue image picker.
  • Resized markItUp editor elements.

2.1.16

  • NEW: Added image picker modal for picking images that have been uploaded to issue.

2.1.15

  • Now including clipboard.min.js locally, to avoid cdn interaction.

2.1.14

  • Corrected email parsing behavior when Email Processing is turned on. MantisBT does not support HTML email natively.

2.1.13

  • Added the following characters to work with the quotee's name in the named quote function (basically to support email-adresses here): . @ - @FSD-Christian-ISS

2.1.12

  • Fixed display of quotes when quotee's name contains unicode characters, commas or single quotes @FSD-Christian-ISS

2.1.11

  • Fixed issue with additional protocols in link insertion.

2.1.10

  • Fixed rendering issue of code blocks when language parameter was left empty
  • Fixed rendering issue of quote blocks when quotee parameter contained whitespaces

2.1.9

2.1.8

  • Removed leftover debug call that was breaking display.

2.1.7

  • Corrected outstanding bug with resolved bug links.

2.1.6

  • Corrected bug in handling of mention links.

2.1.5

  • Corrected use of $this inside code replace callback (causes issues with older versions of PHP).

2.1.4

  • Corrected issues with bug links and mentions.
  • Dropped support for CVS links.
  • Added better code block support for HTML syntax (<br/> tags were getting dropped).
  • Removed duplication of MantisCoreFormatting features. They will be used only when the plugin is enabled.

2.1.3

  • Cleaned up issues with undefined variable notices from old code.

2.1.2

  • Added MarkItUp toolbar support for custom textarea fields.

2.1.1

  • Fixed new parser incompatibility with PHP 5.5.9+.
  • Updated README for all languages supported by code highlighter.

2.1.0

  • Brand new BBCode/HTML parsers, from Genert/bbcode.
  • Updated Prism code highlighter, now with Copy to Clipboard functionality.
  • Addresses multiple outstanding issues.
  • Added check for Mantis Formatting Markdown feature (warns if it is ON, as it will cause issues with BBCodePlus).
  • Cleaned up lots of old code, which will make it easier to maintain.

2.0.18

  • Updated MarkItUp javascript dependency.

Screenshots:

Markup editor

Configuration

Configuration

Supported BBCode Tags

[img][/img] - Images. [url][/url] - Links. [email][/email] - Email addresses. [color=red][/color] - Colored text. [highlight=yellow][/highlight] - Highlighted text. [size][/size] - Font size. [list][/list] - Unordered lists. [list=1][/list] - Numbered lists (number is starting number). [list=a][/list] - Alpha lists (letter is starting letter). [*] - List items. [b][/b] - Bold. [u][/u] - underline [i][/i] - Italic. [s][/s] - Strikethrough. [left][/left] - Left align. [center][/center] - Center. [right][/right] - Right align. [justify][/justify] - Justify. [hr] - Horizontal rule. [sub][/sub] - Subscript. [sup][/sup] - Superscript. [table][/table] - Table. [table=1][/table] - Table with border of specified width. [thead][/thead] - Table head block. [tbody][/tbody] - Table body block. [tr][/tr] - Table row. [th][/th] - Table header column. [td][/td] - Table column. [code][/code] - Code block. [code=sql][/code] - Code block with language definition. [code start=3][/code] - Code block with line numbers starting at number. [code=sql start=3][/code] - Code block with language definition and line numbers starting at number. [quote][/quote] - Quote by *someone* (no name). [quote=name][/quote] - Quote by *name*. 

Supported Languages for Code Highlighting

The implementation of prism.js includes support for languages in 2 modes:

  • default (supported on plugin install).
  • Add support for extra languages (through the plugin's configuration page).

Languages supported by default

KeywordDescription
aspnetASP.NET
bashBash + Shell
basicBASIC
batchBatch
clikeC-like
cppC++
csharpC#
cspCoffeeScript
cssCSS
cC
djangoDjango/Jinja2
dockerDocker
hpkpHTTP Public-Key-Pins
hstsHTTP Strict-Transport-Security
httpHTTP
iniIni
javadoclikeJavaDoc-like
javascriptJavaScript
javaJava
js-extrasJS Extras
json5JSON5
jsonpJSONP
jsonJSON
markup-templatingMarkup templating
markupMarkup + HTML + XML + SVG + MathML
nginxnginx
pascalPascal + Object Pascal
perlPerl
php-extrasPHP Extras
phpdocPHPDoc
phpPHP
plsqlPL/SQL
powershellPowerShell
pythonPython
regexRegex
rubyRuby
smartySmarty
sqlSQL
vbnetVB.NET
vimvim
visual-basicVisual Basic
wikiWiki markup
xqueryXQuery
yamlYAML

Languages supported by the extra languages feature

KeywordDescription
abapABAP
actionscriptActionScript
aplAPL
applescriptAppleScript
autohotkeyAutoHotKey
bisonBison
brainfuckBrainfuck
coffeescriptCoffeeScript
css-extrasCSS Extras
dartDart
diffDiff
dD
eiffelEiffel
elixirElixir
erlangErlang
fortranFortran
fsharpF#
gherkinGherkin
gitGit
glslGLSL
goGo
groovyGroovy
haskellHaskell
inform7Inform 7
jsxReact JSX
juliaJulia
jJ
keymanKeyman
latexLaTex
lessLess
lolcodeLOLCODE
makefileMakefile
markdownMarkdown
matlabMATLAB
melMEL
mizarMizar
monkeyMonkey
nasmNASM
nimNim
nsisNSIS
objectivecObjective-C
ocamlOCaml
processingProcessing
prologProlog
purePure
qoreQore
qQ
regexRegex
restreST
ripRip
rustRust
rR
sassSass (Sass)
sasSAS
scalaScala
schemeScheme
scssSass (Scss)
smalltalkSmalltalk
swiftSwift
tclTcl
twigTwig
typescriptTypeScript
verilogVerilog
vhdlVHDL
close