Tinymce editor different toolbars OJS 3.0

I realized that Tinymce editor in Settings/Journal and Submission do not have the same tools included. ACtually, in Submission there is bulleted and numbered list, but in Settings/Journal there are no numbered and bulleted list tool buttons. Can we have numbered and bullted list included in toolbar in Settings Journal too?
Thanks

Hi @vvucic,

Some inputs are marked “extended”, and some are not. The extended ones (e.g. abstracts) have more tools enabled. You can control how this operates in lib/pkp/js/classes/Handler.js in the initializeTinyMCE function:

// Set the extended toolbar, if requested
if ($(this).hasClass('extendedRichContent')) {
    settings.toolbar = settings.richToolbar;
} else {
    settings.toolbar = settings.defaultToolbar;
}

The rich and default toolbars are defined in lib/pkp/js/controllers/SiteHandler.js:

toolbar: 'copy paste | bold italic underline | link unlink ' +
    'code fullscreen | jbimages | pkpTags',
richToolbar: 'copy paste | bold italic underline | bullist numlist | ' +
    'superscript subscript | link unlink code fullscreen | ' +
    'jbimages | pkpTags',

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks a lot. It is very useful to have that available. If possible, it would be good to add option for other characters. i.e. Greek letters since scientists use them often.

Thanks

@asmecher What I’m doing wrong? In the lib/pkp/js/controllers/SiteHandler.js there is the following code:

richToolbar: 'copy paste | bold italic underline | bullist numlist | ' +
						'superscript subscript | link unlink code fullscreen | ' +
						'jbimages | pkpTags',

However, there are no lists buttons on the rich toolbar.

32

I cleared data and template caches.

Hi @crosfield,

There are two settings to watch out for: toolbar and richToolbar. These are for the two sizes of editor supported in OJS.

When editing the Javascript, you’ll need to turn off the minification in config.inc.php, or your changes won’t be loaded.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher! Thanks for your answer, but unfortunately even with the option enable_minified = Off all richToolbar remain unchanged. Maybe I need a compilation, but I do not know how to do it

Hi @crosfield,

Try also the toolbar setting. Also make sure you do a hard reload in your browser. Which field are you checking to see whether the changes take effect?

Regards,
Alec Smecher
Public Knowledge Project Team

The change in the settings of the toolbar also does not affect anything on the site. All the changes I’m looking in Settings > Journal > About the Journal. Here is small piece of controllers/tab/settings/masthead/form/mastheadForm.tpl template

	{fbvFormSection label="manager.masthead.title" for="masthead" description="manager.setup.masthead.description"}
		{fbvElement type="textarea" multilingual=true name="masthead" id="masthead" value=$masthead rich=true}
	{/fbvFormSection}
	{fbvFormSection label="manager.setup.journalAbout" for="about" description="manager.setup.journalAbout.description"}
		{fbvElement type="textarea" multilingual=true name="about" id="about" value=$about rich="extended" rows=30}
	{/fbvFormSection}

By the way, in js/pkp.min.js it is searched the same right now (I mean, as with enable_minified = On everything should have worked):

toolbar:"copy paste | bold italic underline | link unlink code fullscreen | jbimages | pkpTags",richToolbar:"copy paste | bold italic underline | bullist numlist | superscript subscript | link unlink code fullscreen | jbimages | pkpTags" etc.

It seems that the real settings are located somewhere else. Of course, I cleared the cache both of the OJS engine and the browser before each test.

Please check that you are looking in part of interface that is designed only for default toolbar as defined in lib/pkp/js/classes/Handler.js in the initializeTinyMCE function.

How do I put this menu up? With format, insert, file
ojs1

Hi @asmecher,

I have arrived to this thread because I was looking at the same issue.
I am writing here because I wanted to suggest, for the next releases of OJS, if this functionality could be extended by default to all the textual fields.
It would be useful, I think, and it would avoid the need to do changes in the code, using a child theme.
What would you think? Please take this as a mere suggestion.
Best regards, and always thanks for your attention.
Leonardo

1 Like

Hey, I am unable to find the format menu, which theme are you using? I can not find the top tab “file, edit” insert, etc" in Tinymce, would you please guide me how to fix it?