BBCodePlus - How to get the toolbar?

General discussion about MantisBT Plugins

Moderators: Developer, Contributor

Post Reply
sachintha81
Posts: 20
Joined: 07 Mar 2019, 20:59

BBCodePlus - How to get the toolbar?

Post 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.
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: BBCodePlus - How to get the toolbar?

Post by cas »

Please raise an issue on Github with the developers of the plugin.
Starbuck
Posts: 219
Joined: 14 Feb 2006, 02:53
Location: USA
Contact:

Re: BBCodePlus - How to get the toolbar?

Post 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."
If you want Mantis to work differently, use or create a plugin. Visit the Plugins forums.
Ask developers to create a plugin that you need - and motivate them to help you!
twherzog
Posts: 1
Joined: 09 Mar 2023, 06:43

Re: BBCodePlus - How to get the toolbar?

Post 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.
Post Reply