I'm pondering the thought of installing TinyMCE, mainly to allow users to embed images. How does TinyMCE do it? Where are the images stored? How are they put into the text?

The answer I am hoping for is that the images are stored as attachments and that TinyMCE generates the HTML to show them in the text. Is that so?

Hans-Georg

Comments

betz’s picture

Never used it before, but i know tinymce has a image manager plugin, but its commercial.
If its worth to consider, fckeditor has a free one.

-Anti-’s picture

> the images are stored as attachments

No. I'm afraid that none of the wysiwyg editors 'plug into' or use the core upload module.

The upload module is good because it tracks the attachments, so you can do some useful things with them, regarding the Views module, download count module, etc. One of the weaknesses of the upload module is it only uses one filepath for all files, but the 'upload path' module helps this issue. So the only real weaknesses of it are that you can't easily place images and files inline, and that you can't re-use images or files which have already been uploaded.

So whilst TinyMCE or FCKeditor solve these problems, they also come at the disadvantage of the files not being 'tracked' by Drupal.

To answer your question, TinyMCE on its own does not have upload capability (if I remember rightly). You click an image button and have a field only for a URL to link to an already uploaded image/file, or hotlink to an image on another website.

FCKeditor *does* come with its own basic file uploader/browser. It's upload path also accepts a limited amount of tokens, so files are automatically put into a pre-defined folder structure on the server.

However, both of these editors plug into the IMCE file uploader/browser module, which is really quite powerful and adds much capability to the ediotrs, at the cost of being a little more complex than the simplistic FCK file handling.

There are about three other file uploader/browsers out there, but IMO they are not quite as stable as IMCE (ie. when testing them, they failed to work properly). Having said that, IMCE occasionally throws up a browser incompatibility of its own (eg there is an issue where its 'send to editor' button disappears from time to time).

All of these, including FCK and IMCE, upload in the same way: click the 'image' button, click 'browse' button, choose the file from the desktop, click 'upload', click 'insert' to insert the image at the cursor in the editor. And if you want to re-use a file, instead of browsing the desktop, you browse the remote server. All take several steps.

The last direction you can take is using CCK module to handle your images/files as nodes in their own right. I've never understood why you'd want to do this though, except perhaps for a quick and dirty image gallery. Treating files as nodes IMO is overkill for most purposes.

The good news is that there is no reason why you have to choose any one of these three methods over the others. They will all work independently. For instance, I use core attachments for providing downloads and have made a downloads 'section' by creating a view which lists all the attachments into groups. But I use FCK and IMCE for the files/images/media which are going to end up in the body of the content. I haven't thought of a use for CCK image and file fields yet, and think it is quite ugly to use them anyway, so I'll probably avoid that method.

bramface’s picture

If you upgrade to the development version of http://drupal.org/project/imce_wysiwyg the "send to editor" function works with the combo Wysiwyg, IMCE, IMCE WYSIWYG, Inline (and Ajax Plugin - wysiwyg - but would work without it).

BTW: If you ever discover that your "send to editor" IS working but your node revisions are not saving (e.g. you get empty body fields in your node revisions table for new nodes, or no changes to the node revisions table after making edits) it may be because you have accidentally left Tiny Tiny MCE enabled after also enabling WYSIWYG.

Not that anyone would be so foolish....

--
Bram Moreinis
Greenfield Digital
http://greenfielddigital.com

coreyp_1’s picture

I have use Image Assist (http://drupal.org/project/img_assist) before on a production site.

- Corey

hgmichna’s picture

Corey, I think Image Assist, with its dependency on Image, is overkill for most web sites. What I want is to add a few pictures to a node with clickable thumbnails, that's all. An additional wish may be the ability to embed the thumbnails somewhere in the text.

-Anti- wrote:

The last direction you can take is using CCK module to handle your images/files as nodes in their own right. I've never understood why you'd want to do this though, except perhaps for a quick and dirty image gallery. Treating files as nodes IMO is overkill for most purposes.

Couldn't agree more. I want to attach pictures to a node. If I delete the node, the pictures should automatically be deleted with it.

The Node Images module used to solve this problem, but it is out of the question because of very poor support (still no workable version while Drupal is already at 6.6) and of incredibly poor quality. (Had to fix all the CSS to make it acceptable.)

Depending on third-party modules always creates a big problem, but as far as images are concerned, there is the possibility that a third party module only does the embedding through attachments and HTML injection, which the users could also, awkwardly, do by hand. The huge advantage would be that the Drupal operator would not depend on the availability of that third party module and could switch to another one in the future, without losing all the pictures.

Too bad I'm not into PHP programming. I'd like to do this, but don't have enough time. If you want to see the pain, have a look at http://elephanttrust.org/node/32.

Hans-Georg

El Bandito’s picture

I share the frustration of these posts and many other threads on the forum ( just search for the word "images" ). It seems almost incredible to me that there isn't a straightforward and well-supported way to do the following in Drupal 6 :

1> Add one or more images to a node via a simple upload interface.
2> Relate a short comment to each image.
3> Have thumbnails and autoresize capability.
4> Control the layout of the images and comment using templates.

I am new to Drupal and surprised that there are so many sophisticated module possibilities, but that such a simple piece of functionality seems to be missing. Surely this is an opportunity for someone, or for the maintainer of the Node Images module to plug the gap with an updated contribution ?

Frustrated !!!!!!

Dave

WorldFallz’s picture

IMO it's not so much that this is missing as much as there are so many different ways to approach it no true winner has emerged yet. atm, it seems the future is going to be leaning toward the merging of the image and imagefield modules. Also, a new module I recently discovered, http://drupal.org/project/imagebrowser, looks very promising. There's also the http://drupal.org/project/asset module as well.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

hgmichna’s picture

After a short test I uninstalled it again, because it is a dinosaur and practically unusable. My average web site user would not be able to handle this monster. It has an initially unintelligible two-step concept that is totally out of touch with reality. Nobody needs this.

It is a pity, because its maker is undeniably capable of producing good software. He was just misguided in his direction. If he could make another version called "Imagebrowser ultralight", then I'd be interested again.

Such efforts are quite unnecessary, at least for me and probably for another 99% of all Drupal users. All I want is a bit of code that places clickable thumbnails of image file attachments into the text of the message, just a bit of HTML. An added bonus would be to allow float:left and float:right layout options. Another added bonus would be a line of small text under each thumbnail, but that's already more than I need, particularly since the user could make small modifications to the HTML code himself.

The very important aspect is that the images would stay if the module goes down the drain. If you've operated Drupal sites through several Drupal versions, you know the pain. How can you possibly build a site on contributed modules, for which there is no guarantee that they will be updated for the next Drupal version?