I found that the version of TinyMCE (3.4.9 -2012-02-23)
installed on my OJS 2.4.8, lacks some tools like Format, Font Family, and Font Size.
Is there a way to activate them?
Regards
This isn’t configurable in the UI, but you can customize the initialization here:
$tinymceScript = '
<script language="javascript" type="text/javascript" src="'.$baseUrl.'/'.TINYMCE_JS_PATH.'/tiny_mce_gzip.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE_GZ.init({
relative_urls : "false",
plugins : "paste,'.(Validation::isLoggedIn() ? 'jbimages,' : '').'fullscreen",
themes : "advanced",
languages : "' . join(',', $localeList) . '",
disk_cache : true
});
</script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
entity_encoding : "raw",
plugins : "paste,'.(Validation::isLoggedIn() ? 'jbimages,' : '').'fullscreen",
mode : "exact",
language : "' . PKPString::substr(AppLocale::getLocale(), 0, 2) . '",
elements : "' . $enableFields . '",
relative_urls : false,
This file has been truncated. show original
The addition of new plugins (if not shipped with the default install) could be done in the shared library (./lib/pkp/):
lisa
July 16, 2018, 10:49am
4
Hi, I have the same problem. But my tinyMCE code is diferent than yours:
The screenshots you have appear to be from the OJS/OMP 3.x version:
In 3.x the parallel code is here:
//
// Public static methods.
//
/**
* Initialize the tinyMCE plugin
*/
$.pkp.controllers.SiteHandler.prototype.initializeTinyMCE =
function() {
if (typeof tinyMCE !== 'undefined') {
tinyMCE.PluginManager.load('jbimages', $.pkp.app.baseUrl +
'/plugins/generic/tinymce/plugins/justboil.me/plugin.js');
tinyMCE.PluginManager.load('pkpTags', $.pkp.app.baseUrl +
'/plugins/generic/tinymce/plugins/pkpTags/plugin.js');
tinyMCE.PluginManager.load('pkpwordcount', $.pkp.app.baseUrl +
'/plugins/generic/tinymce/plugins/pkpWordcount/plugin.js');
var tinymceParams, tinymceParamDefaults = {
width: '100%',
resize: 'both',
This file has been truncated. show original
This code indicates that you should be able to override the default parameters for TinyMCE via a specific incantation. Perhaps @NateWr or @asmecher might be able to point to an example in the code?
1 Like
vikoc
April 29, 2020, 12:09pm
6
Sorry for bumping the old thread but is there someone who can show me how can I override default parameters for TinyMCE?
Thanks in advance