Page 1 of 1

BBCodePlus - How to get the toolbar?

Posted: 11 Mar 2019, 23:27
by sachintha81
I installed BBCodePlus https://github.com/mantisbt-plugins/BBC ... ster-2.0.x plug-in in my mantis installation, and it works on text areas just fine. I can manually do [ b]some text[ /b] etc and it will show me bold/italic etc.

However I cannot figure out how to get the toolbar to work. But according to the plugin Wiki, it's supposed to show you a toolbar as shown below:
https://github.com/mantisbt-plugins/BBC ... ster-2.0.x

Image

Any help on getting it to work is highly appreciated.

Re: BBCodePlus - How to get the toolbar?

Posted: 12 Mar 2019, 07:52
by cas
Please raise an issue on Github with the developers of the plugin.

Re: BBCodePlus - How to get the toolbar?

Posted: 17 May 2019, 20:34
by Starbuck
Correct link to this plugin:
https://github.com/mantisbt-plugins/BBCodePlus

Note from the Github README:
"NOTE: This plugin does NOT interact well with the Markdown Processing feature of the Mantis Formatting plugin. Disabling the functionality is advised."

Re: BBCodePlus - How to get the toolbar?

Posted: 09 Mar 2023, 23:34
by twherzog
The toolbar is added via the javascript file '/files/markitup-init.js'. You can see which type of inputs it's supposed to add the toolbar to by looking at the code:

Code: Select all

(function($) {
	$(document).ready(function() {
		// declare the path to the previewer using the plugin file processor.
		mySettings.previewParserPath = "./plugin.php?page=BBCodePlus/preview.php";
		// apply to proper text areas.
		if ( $("textarea[name='bugnote_text']") )
			$("textarea[name='bugnote_text']").markItUp(mySettings);
		if ( $("textarea[name='description']") )
			$("textarea[name='description']").markItUp(mySettings);
		if ( $("textarea[name='steps_to_reproduce']") )
			$("textarea[name='steps_to_reproduce']").markItUp(mySettings);
		if ( $("textarea[name='additional_info']") )
			$("textarea[name='additional_info']").markItUp(mySettings);
		if ( $("textarea[name='additional_information']") )
			$("textarea[name='additional_information']").markItUp(mySettings);
		if ( $("textarea[name='body']") )
			$("textarea[name='body']").markItUp( mySettings );
		if ( $("textarea[name^='custom_field_']") )
			$("textarea[name^='custom_field_']").markItUp( mySettings );

		// add snippet text area
		if ( $(".snippetspatternhelp textarea[name='value']") )
			$(".snippetspatternhelp textarea[name='value']").markItUp( mySettings );
	});
})(jQuery);
I added a little custom code to mine at the end to add the toolbar to the Snippets plugin.

Maybe you aren't using the JQuery UI plugin? I'm not sure if it's required, but I do have it installed.