Jump to content

Image field with WYSIWYG description


Nico Knoll
 Share

Recommended Posts

Hey,

is there a way to "blow up" the image description field? Because I'm building a site or a photographer who needs longer descriptions for his images. But I don't want to create an entire page for every image...

/ Nico

Link to comment
Share on other sites

As far as I know, the only way to do this would be applying an RTE with a module.

Hooking into InputfieldImage::renderItem would give you access to inputfield output, but I'm not exactly sure how TinyMCE (or CKEditor, if you're using that) is configured by default, i.e. is it enough to add a class to the description textarea (which should appear once the field is configured to hold more than one row of description data) or do you actually have to add custom JavaScript to apply it to image descriptions.

Link to comment
Share on other sites

You can set the description to have multiple row.

Rather than just one input it will be a textarea. You could even use markdown or something and use textformatter on output.

I would go for page per image.

  • Like 3
Link to comment
Share on other sites

Yes, I would go for page per image with a specific template too.

Partly because this gives the freedom of adding all kinds of information, but also in the template you can extract the image meta that the photographer will have as part of his images by default and use it for things like page metadata or simply for display purposes.

Somewhere, in the depths of time I had a baby PHP script that pulled all that data from an image - I would think there are loads kicking around.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...