In looking to customize the RTE, I found this file: /resources/scripts/jive/model/settings.js
That seems to be where customized toolbar properties are defined. I wanted to override this file so I could modify those settings or create a custom set of properies of my own. I saw this thread...
http://www.jivesoftware.com/jivespace/message/97095#97095
...where someone said they copied the file from source into jiveHome/resources/script.
So I made a copy of settings.js and placed it here:jiveHome/resources/script/jive/model/settings.js
The file was not being included and the RTE was failing. I found where this file was being included into clearspace...
template/decorator/default/header-javascript-jive..ftl
So I created a copy of that file within my theme.
/jiveHome/theme_name/template/decorator/default/header-javascript-jive..ftl
So I modified the include line to make sure my version of the file was getting included. I tried variations like changing it from a resource include to a script include (skipping the js compression step), but that did not work. I tried placing the file in different locations, and changing the file name. I added alert("test") to the js to test that it was being included when the editor gets loaded. I tried adding my own test.js file with an alert() within it to make sure I was getting the paths right. I was able to properly do an include of my test file within template.ftl, but not within header-javascript-jive.ftl.
So, put simply, if anyone could help me figure out how to override settings.js, I would appreciate the help.
I realize there are some options within the admin interface to turn off features of the RTE, but I'm looking for more configuration control, such as loading custom settings depending on the user's role.
Thanks
Brian
Hello,
I'm really in need of an answer for this soon. We are planning to go into Beta testing for the site tomrrow.
The issue is being able to customize the toolbar options of TinyMCE. The only option I found for this was overriding settings.js which defines the toolbar options (among other options).
Any ideas are appreciated.
Are you looking to add a new button to the RTE, or to just remove buttons?
I am mainly looking to remove buttons, but there was also a request to allow certain tools to appear for certain users. So I was looking into overriding the services.js file so I could create my own config definitions to use when I call the RTE constructor method.
Most of the Clearspace Javascript files are stripped of whitespace before being packaged into clearspace-x.x.jar. These files have a '-min' appended to their name. For settings.js, the optimized file is called settings-min.js. If you apply your change to that file, and then repackage it into clearspace-x.x.jar, you'll likely see your customization take effect.
Thank you very much. That worked. I didn't see any settings-min.js files, but I did see a settings.js file and I modified that to customize the buttons for TinyMCE. I zipped up the clearspace_community_2.5.3.jar and placed it back in the lib directory.
Much appreciated!
Brian