cancel
Showing results for 
Search instead for 
Did you mean: 

TinyMCE editor not working

dmihelj
Champ in-the-making
Champ in-the-making
In version Alfresco 4.0.b when editing articles on WCMQS site, the dialog is without WYSIWYG editor and the javascript console throws error:

tinymce is not defined

in file tiny_mce-min.js (line 1).

Please help.
6 REPLIES 6

bremmington
Champ on-the-rise
Champ on-the-rise
Are you editing using the Web Editor or Share?

dmihelj
Champ in-the-making
Champ in-the-making
Are you editing using the Web Editor or Share?

I am using AWE editor on finance site.

[img]http://dl.dropbox.com/u/11489461/awe.JPG[/img]

dmihelj
Champ in-the-making
Champ in-the-making
OK, here's what it is: the error says, that is missing a tinymce object, which wasn't created. After comparing files with 3.4.c version of AWE I noticed, that in file "awe-plugin-context.xml", the Alfresco TinyMCE javascript has a dependency on the "com.moxiecode.tinymce" patched script, which is missing in version 4.0.

Comparison:
Alfresco 4.0.b
   <bean id="alfrescoTinyMCE" class="org.springframework.extensions.webeditor.WEFResourceImpl">
      <property name="name" value="org.alfresco.editors.tinymce" />
      <property name="description" value="Alfresco wrapped TinyMCE control" />
      <property name="path" value="/res/modules/editors/tiny_mce.js" />
      <property name="type" value="js" />
   </bean>

Alfresco 3.4.c
   <bean id="alfrescoTinyMCE" class="org.springframework.extensions.webeditor.WEFResourceImpl">
      <property name="name" value="org.alfresco.editors.tinymce" />
      <property name="description" value="Alfresco wrapped TinyMCE control" />
      <property name="path" value="/res/modules/editors/tiny_mce.js" />
      <property name="type" value="js" />
      <property name="dependencies">
         <list>
            <ref bean="tinyMCE" />
         </list>
      </property>
   </bean>
  
   <bean id="tinyMCE" class="org.springframework.extensions.webeditor.WEFResourceImpl">
      <property name="name" value="com.moxiecode.tinymce" />
      <property name="description" value="TinyMCE library" />
      <property name="path" value="/res/modules/editors/tiny_mce/tiny_mce_src_patched.js" />
      <property name="type" value="js" />
   </bean>

Has something been changed in these javascript libraries?

dmihelj
Champ in-the-making
Champ in-the-making
OK, now it works.

I had to add the xml dependency stated in the previous post to file "awe-plugin-context.xml" and package it with other files to new "alfresco-webeditor-plugin-4.0.b.jar" file.

In the "alfresco-forms-client-4.0.b.jar" file I had to patch "tiny_mce_src.js" file and add a min variant of the javascript file.

Replaced the two jars in awe folder on the server -> restart and it started working. The TinyMCE editor displays and functions correctly in the WCMQS web sites (tested on Chrome, Firefox and IE).

bremmington
Champ on-the-rise
Champ on-the-rise
Thank you very much for persisting with this. I've raised ALF-11310 in Jira, and referenced this thread for information.

davidcognite
Star Contributor
Star Contributor
Thanks for your help, I've now fixed this issue. It was caused by a TinyMCE upgrade we did for Share in a common library that AWE/WQS also uses.
The fix is commited to HEAD (r32082), so should be available in the public SVN or in the next nightly build/community release.

David.