cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to customize Web Client's TinyMCE editor

hbf
Champ on-the-rise
Champ on-the-rise
Hi there,

I need to customize the TinyMCE editor that the Web Client (not WCM) uses, i.e., the code

   <%– Init the Tiny MCE in-line HTML editor –%>
   tinyMCE.init({
   …
   });

that is output by web-client/source/web/jsp/content/create-content-wizard/create-html.jsp and web-client/source/web/jsp/dialog/edit-html-inline.jsp.

What is, with respect to future updates of Alfresco, the best way to do this?

An AMP that overwrites the files comes to mind, as a brute-force solution.

Also, it seems (I might be wrong) that Customising An Alfresco JSP does not apply – at least, I don't know what "from-outcome" to specify.

Thanks,
Kaspar
1 REPLY 1

hbf
Champ on-the-rise
Champ on-the-rise
For the ones that really needs this, here's how you can do this in a brute-force way without modifying alfresco.war directly:

1. Copy into source/web/jsp/content/create-content-wizard/create-html.jsp and source/web/jsp/dialog/edit-html-inline.jsp of your AMP the two files create-html.jsp and edit-html-inline.jsp, respectively. (These are the files mentioned in the original post.) Customize them according to your needs; you'll find tinyMCE.init in there.

2. Make sure your AMP build.xml contains in the target "package-amp" a zip-fileset
<fileset dir="${project.dir}/source" includes="web/jsp/**" />
.

(Notice that is approach is very bad: if in a future release/update the two mentioned files change, you have to adapt your copies!)

Kaspar