WYSIWYG ImageField

WYSIWYG ImageField is my latest Drupal module, a module designed to help bridge the gap between WYSIWYG based inline image management and the power of The CCK based ImageField module.

It originally came about while working on a site for a client, the designer had provided guidelines on how inline images should be rendered, with multiple options, to keep a clean look to the site content. Unfortunately the standard behavior was to use the IMCE module to give the client a seamless WYSIWYG experience. The obvious negative to this practice is the lack of control and extensibility one could achieve by the use of the ImageField module.

My previous thoughts on this issue (because it is an all to common issue) was to go with a simple configuration of ImageField and the Insert module, coupled with a few ImageCache presets. While this worked fine for me, it just wasn't as simple and as integrated as IMCE for a client to wrap their head around.

So WYSIWYG ImageField took this original concept with the intent of bringing it inside of the WYSIWYG environment.

The concept is rather simple really, a jQuery UI dialog wrapper for an ImageField, triggered by a WYSIWYG plugin, with additional support for the FileField Sources module, customized with a predefined View to bring an IMCE-esque Image Library for referencing previously uploaded images. Simple...

The module itself is basically just a glue code, and was originally intended to be a feature, leveraging the power of preexisting modules instead of attempting to reinvent the wheel, and bringing them all together in a nice clean package.

There will no doubt be further updates in the near future, especially after gathering some user feedback, but in the mean time, head over to the project page and check out the initial release.


This is amazing! Currently my beloved combo for Drupal 6 is filefield + imce + filefield sources + insert. It's great to see that your module integrates with most of these, and I'm looking forward to test it out.

Wim Mostrey (not verified) on 9 August 2010 - 5:31pm

How is this approach different to WYSIWYG Image Upload and would it make sense to consolidate efforts?

tstoeckler (not verified) on 9 August 2010 - 7:59pm

@tstoeckler

I made a respectable effort to do exactly that, but unfortunately it was not Eugen's desire to make such a large change to his own module.

The obvious differences are that WIU uses a FAPI based upload field, whereas WIF relies on the CCK ImageField module. The benefits being that WIF automatically inherits support for all ImageField based extension modules, support for CCK Formatters, and more.

I will note that when I was first informed of WIU I did stop development, and seriously consider shelving the module, and would definitely have done so if a collaborative effort could be met.

Hope this clarifies things for you.

Cheers,
Deciphered.

Decipher on 9 August 2010 - 8:11pm

Excellent, as always, Stuart. :)

Image fields, especially when considering fields in D7, are definitely the way to go, when having to choose between both options.

Of course, your work slightly duplicates the goals of http://drupal.org/project/inline (HEAD), for which the most advanced Wysiwyg + Inline + X integration code still exists in a hidden attachment of a drupal.org issue unfortunately, still (working) proof of concept code, but still requiring someone to _dedicate_ a fair amount of time to make sure that it really works for all intended use-cases. Or in other words: Despite increasing interest in "real" and usable content publishing from acquia and other organizations, people still prefer to scratch their one-way throw-away single use-case itches. Kinda sad, as that means we've to move on with incremental improvements and heavy module mergers (potentially WIU into WIF at some point)...

err... um, sorry, those rambling thoughts aren't against your very welcome efforts here; probably the completely wrong place here :)

Thanks for putting so much energy into this!

sun (not verified) on 10 August 2010 - 12:22pm

Well i think it is just the start, as the module will continue it path you will run into several strong deadends.

- With this approach images cant be used in comments
- You cant use this on types where you have several image fields
- What about things like "webforms"
- What about things like "blocks" ( images there )
- What about "panel panes" inline content

this list can be continued. there are several places where WYSIWYG is in place + FAPI, but no CCK support is there.

Dont get me wrong, your module looks very good - impressive. But my decision not to use cck as the backend was by intention and actually based on quiet some experience with this field alread.

WUI is not the only "inline content" implementation i have written for drupal, its the only one i released though. I have tried different implementations, also WUI 1.x was different.

In the end, in the current WYSIWYG cope especially with the lack of modifing the selection, a FAPI implementation on Filters with different "representation" for WYSIWYG and "node render time" is the only way to create deep and powerful integrations.

Anyway, good job here. Iam looking forward how you deal with the problems i have with the implementation you chose and hope you find ways i did not think about :)

EugenMayer (not verified) on 14 August 2010 - 4:51am

After I've looked for so long! I just started using your module and I really like how you wrapped the existing methods of uploading and adding images inline to a wysiwyg field into truly seamless operation. You completely changed the UI experience of 4+ ridiculous steps to add an inline image to the node being created/edited. Using image_resize_filter with this makes it an even more awesome user experience. If only the image was deleted from the filesystem when removed from the field. That's not your modules issue.

I've been using nodes instead of files for images with a custom wysiwyg node browser using views. You finally made using files for images viable again. Thanks for such a great contribution!

Maybe put multi-upload on your road map?

Dale Dude (not verified) on 10 August 2010 - 6:40am

looks like a nice set of features. cant wait to try out tomorrow!

mike stewart (not verified) on 10 August 2010 - 2:53pm
© 2007 - 2010 deciphered.net. All rights Reserved.