newism / nsm.tiny_mce.ee_addon

Other
6 stars 3 forks source link

TinyMCE WYSIWYG doesn't load on my textarea box? #12

Open maushana opened 12 years ago

maushana commented 12 years ago

I downloaded and installed the TinyMCE with NSM Morphine on my EE 2.3.1 and it doesn't seem to work. When I added the field to my channel everything seems like it's there. But when I go in to add/edit an entry in my channel the WYSIWYG editor/buttons are not there. Any idea what I'm doing wrong?

Thank you,

Mike

iainsaxon commented 12 years ago

Hi Mike,

If the buttons have not loaded then there may have been a problem loading in the config files from the 'themes/third_party/nsm_tiny_mce' directory.

Can you please tell me if you see any errors or 404 responses in your Webkit/Firefox error console?

Best regards, Iain Saxon EE-Garage / Newism

maushana commented 12 years ago

Hi Lain,

Thank you for the quick reply. I see the following error:

Error: $(".mor table.col-sortable").tablesorter is not a function Source File: http://mydomain.com/themes/third_party/nsm_morphine_theme/scripts/compressed.js Line: 39

Thank you,

Mike

iainsaxon commented 12 years ago

Hi Mike,

That shouldn't be causing issues with TinyMCE as that error is coming from the Files Modal window.

But let's fix that error now.

Please follow these steps to prevent the NSM Morphine accessory from loading into the Files Modal window:

Log in to your ExpressionEngine control panel Browse to the Accessories Manager (Add-Ons → Accessories) Go to the NSM Morphine Accessory Preferences form Under the Assigned Pages list expand the Content tree and un-tick the Content - Files - Modal option.

That should fix that error. Now to find out why TinyMCE is not working. Could you please check your Network activity log and see if there is a config.js (or similarly named file) that has not been loaded properly?

Best regards, iain Saxon EE-Garage / Newism

maushana commented 12 years ago

Hi Iain,

Thanks for the fix for the NSM Morphine. I checked the network activity and I don't see any js files loaded that are called config.js or the like? However, I do see a 404 error for the following file that is missing:

/themes/third_party/nsm_tiny_mce/scripts/tiny_mce/plugins/pagebreak/editor_plugin.js

This is the error it's throwing:

The requested URL /themes/third_party/nsm_tiny_mce/scripts/tiny_mce/plugins/pagebreak/editor_plugin.js was not found on this server.

I checked the zip file content I downloaded from the website and I don't see any folder in there called "pagebreak" it's seems to be missing? Is this what is breaking the WYSIWYG?

Thank you,

Mike

iainsaxon commented 12 years ago

Hi Mike,

Strange that the plugin is no longer in the repo as of version 1.0.0. It looks like the directory was removed from the repo but still present in the configuration files. I'll need to update this as soon as possible.

In the meantime have two ways to fix the problem.

Option 1 is to re-add the pagebreak plugin to TinyMCE. Download the 1.0.0RC2 version of NSM TinyMCE from the branches page at https://github.com/newism/nsm.tiny_mce.ee_addon/tags. Then copy the pagebreak plugin from the old version of TinyMCE and upload it to where it belongs on your website.

Option 2 is to remove the plugin from the configuration files. Open the config files located in 'themes/third_party/nsm_tiny_mce/scripts/tiny_mce_config/'. Remove "pagebreak" from line 37 in basic.js and line 39 from advanced.js.

Please let me know how you go.

Best regards, Iain Saxon EE-Garage / Newism

maushana commented 12 years ago

Hi Iain,

Thank you for the quick reply. I went with option 1 and now the WYSIWYG works. But when I choose "Advanced" config for my field the top buttons don't show only the footer buttons show. But if I choose "Basic" config the top buttons show. I need to have the advanced options. Any idea why the advanced buttons at the top are not showing? I check the network activity and everything looks good no more errors.

Thank you,

Mike

iainsaxon commented 12 years ago

Hi Mike,

I've tried the latest version TinyMCE and haven't had the issue you're now experiencing.

If the top buttons aren't showing it can be for a number of reasons (few actually making much sense).

These people have been having issues with TinyMCE (http://forum.joomla.org/viewtopic.php?f=474&t=455658) and these are some of the fixes they tried:

My suggestion would be to alter the advanced.js config file and remove all plugins and add them back in to the config in batches to narrow down what plugin/s may be causing issues.

Please let me know how you go.

Best regards, Iain Saxon EE-Garage / Newism

maushana commented 12 years ago

Hi Iain,

Thanks for all the help with this. I managed to create my own config file and now the top buttons are showing. The one thing that is happening now is some of the icons are not displaying. I'm starting to think that I might have a bad zip file that I downloaded which might have a lot of missing items. Do you know which folder I need to check for the icons and so I can try uploading them again or maybe I should download another zip and re-upload the folders again?

Thank you,

Mike

iainsaxon commented 12 years ago

Hi Mike,

Can you see what is going wrong with the icons in the network activity console? Are the image requests returning a 404 or some other error? What icons aren't loading (might help narrow down the bad plugins)?

Could you please back up your nsm_tiny_mce directories and try installing the version from http://ee-garage.com/nsm-tinymce instead? I'm curious to see if this version fixes the problem. If so I'll see what has happened with the repo, perhaps the Github copy of NSM TinyMCE is out-of-date.

Please let me know how you go.

Best regards, Iain Saxon EE-Garage / Newism

maushana commented 12 years ago

Hi Iain,

I checked the network activity and there are no images being loaded. This is because the icons are getting loaded through the CSS I think? I will try re-installing the version from ee-garage to see if it makes a difference and get back with an update.

Thank you,

Mike

maushana commented 12 years ago

Hi Iain,

I installed the new files from ee-garage.com and it all works now :). The one difference I noticed is in the zip file I downloaded from here there is a file called "acc.nsm_tiny_mce.php" which is not in the zip I downloaded from the ee-garage.com site. Would this have anything to do with the issues I was having?

Thank you,

Mike

iainsaxon commented 12 years ago

Hi Mike,

I'm not sure why the accessory was cut from the addon. It was probably found to be no longer needed and removed. Afraid I can't tell you wether or not it was the cause for the earlier issues.

I'll try and fix this public Github repo as soon as I get a chance.

In the meantime if there is a problem with an addon prefixed with NSM it will most likely reside on http://ee-garage.com. We try and keep the documentation for our addons as up-to-date and comprehensive as possible.

Glad to hear NSM TinyMCE is now working for you :) .

If you have any further issues with NSM TinyMCE or another of our addons please feel free to post a support request here or on http://ee-garage.com.

Best regards, Iain Saxon EE-Garage / Newism

maushana commented 12 years ago

No problem. Thank you for all your help with this issue much appreciated.

Thank you,

Mike

maushana commented 12 years ago

Hi Iain,

Is there a way to add a custom image button that will launch the EE file manager to select the image I want to embed in the WYSIWYG editer? Currently we have to manually enter the image details like the path etc. Not sure how easy this might be to do but we need to make it work this way. Any help is appreciated.

Thank you,

Mike

iainsaxon commented 12 years ago

Hi Mike,

Unfortunately this level integration of EE's file manager into TinyMCE is beyond the scope of the addon :( .

If you need this level of EE integration you'll need to use an addon that was built to address this.

We use Pixel and Tonic's Wygwam (http://pixelandtonic.com/wygwam) in these circumstances.

If you are feeling adventurous you could try and add this to TinyMCE (http://www.tinymce.com/wiki.php/How-to_implement_a_custom_file_browser) but in all honesty if you need to provide your client with a content editor with EE file manager support you may be better opting for a commercial product.

Best regards, Iain Saxon EE-Garage / Newism

maushana commented 12 years ago

Thanks Iain. We are actually looking to purchase the Pixel & Tonic tools which include Wygwam. This will save me some "advanturous" programming :)

Thank you,

Mike