Any chance of getting TinyMCE 3.x to work on D 5.x? Is there an easy hack to make this possible using the existing code?

Cheers,
Chris.

Comments

awolfey’s picture

I've just installed TinyMCE 3.1 and it seems to mostly work with 5.x. Only thing so far is rich text disable doesn't work.

gpk’s picture

gpk’s picture

Version: 5.x-1.9-1 » 5.x-1.9
Status: Active » Closed (duplicate)

Actually the current 5.x release is 5.x-1.9 not 5.x-1.9-1 if I'm not mistaken ...

With the fix at #2 I find that TinyMCE 3.1.0.1 works fine with Drupal 5.7.

gpk’s picture

Status: Closed (duplicate) » Active
awolfey’s picture

Thanks. All is good.

wmostrey’s picture

Status: Active » Needs review
StatusFileSize
new657 bytes

Here's the patch for the fix in #2 (which I marked as duplicate). I hope this gets fixed soon, the asset module is ready for TinyMCE 3 and this patch is all that's standing in its way.

jenlampton’s picture

Status: Needs review » Reviewed & tested by the community

patch works for me, and the fix worked others on the other thread (http://drupal.org/node/234380#comment-775405)

brianV’s picture

Patch worked for me as well.

One other necessary change for TinyMCE 3.x support would be to go over plugin_reg.php and ensure that we have registered the new plugins.

For example, the 'flash' plugin is out, superceded by the new 'media' plugin. This new media plugin also handles embedding Youtube and other video servers.

So, for example, you would add:

$plugins['media'] = array();
$plugins['media']['theme_advanced_buttons1'] = array('media'); 

and remove:

$plugins['flash'] = array();
$plugins['flash']['theme_advanced_buttons3'] = array('flash');
$plugins['flash']['extended_valid_elements'] = array('img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|obj|param|embed]');
brianV’s picture

StatusFileSize
new3.18 KB

I've gone through the plugin_reg.php and registered the relevant new plugins packaged with TinyMCE 3.X. I haven't tested them all, but they should be working.

I left out several plugins which didn't make sense given the use of TinyMCE within Drupal (eg., full page editing etc.)

Between this patch and wmostrey's patch in #6, we should have full TinyMCE 3.X compatibility if no issues are found.

I would suggest rolling these into a 2.0 release of the TinyMCE module, given it's (now) incompatibility with the 1.X module releases.

Once we get this rolled, Asset and IMCE integration can proceed!

**edit - this patch is rolled against the 1.9 module release

brianV’s picture

StatusFileSize
new40.41 KB

Here is a copy of the patched module for people who don't want to worry about patching :p

brianV’s picture

Title: TinyMCE 3 support for Drupal 5.7 » TinyMCE 3 support for Drupal 5
Status: Reviewed & tested by the community » Needs review
StatusFileSize
new3.59 KB

Updated the plugin_reg.php to allow inline style attributes for images.

The advanced image tool uses style attributes to handle alignments and spacing by applying margin and floats to it.

As a side note - you must have the HTML filter disabled in your input format of choice, as the HTML filter strips out the style attributes when displaying content.

Once again, this patch must be used alongside wmostrey's patch in #6 for full TInyMCE 3.X support. Patch is based off of the module's 1.9 release.

chaldar’s picture

The tinymce3 patch for D5 seems to break the TinyMCE and IMCE file browser plugin integration. Has anyone else here experienced this problem?

I highlighted this at #296710: tinyMCE image button broken but am unable to get any attention from anyone :-(. Is anyone successfully using D5+TinyMCE3+IMCE?

Thanks a lot for any clarification or hints.

awolfey’s picture

It's working for me. I did not apply the patch, but I did change plugin reg by hand. I haven't looked at the patch so don't know what else is in there.

jsenich’s picture

subscribe

momper’s picture

sub

chaldar’s picture

Finally I got everything working with Drupal 5.7, the latest tinyMCE 3.2 release, the above patches, and even the formatting tips toggle patch #294972: Toggling TinyMCE and formatting tips, and IMCE 1.2.

I did the following:

  1. disable tinyMCE support in IMCE setting.
  2. delete the tinyMCE profiles.
  3. remove the 'access IMCE' and 'access tinymce' permissions from all roles.
  4. disable the IMCE and tinyMCE modules
  5. uninstall the tinyMCE module
  6. connect to the database and remove all variables with name LIKE '%mce%' from the variables table and remove the variables entry from the cache table (this step may not be essential but I suspected garbage settings were creating problems and I didn't want to take a chance)
  7. remove the old tinyMCE module directory completely
  8. reinstall the tinyMCE module directory
  9. apply all the patches
  10. extract the tinymce 3.2 release inside the tinyMCE module directory
  11. enable tinyMCE module
  12. recreate tinyMCE profiles
  13. enable IMCE module and IMCE support for tinyMCE

I had the following options set in my earlier installation: rich-text ON by default, users cannot choose the default setting, and show the rich-text toggle link. After all the above changes, users who used tinyMCE/IMCE before may find that rich-text is disabled by default. To correct this, you may need to enable 'user can choose default' and set that choice to 'enabled' for each of these users at their account edit page, and then switch off the user option again. I couldn't figure out a better way of fixing this last bit, but this does the job. So now my users have the latest tinyMCE 3.2 with IMCE file browsers working perfectly.

wmostrey’s picture

Status: Needs review » Closed (won't fix)