The image is output by the native Umbraco "Insert picture" feature found in the WYSIWYG editor. If this output was handled by a scripting file I could add in a call to the "caption" field.
Is there a way I can hook this WYSIWYG editor feature in to a Razor scripting file? How would I go about modifying the behaviour of this "Insert picture" feature?
Thanks for that. So there's no way to intercept the default "Insert picture" feature to be output by a Razor scripting file that I can control instead? Any more information you can provide on your proposed solution would be appreciated.
Changing default image output to include "caption"
For each image within my /Media folder you can add a "Caption" value.
However when writing an article and inserting this image from the /Media folder the caption isn't included as well.
Do I need to mofidy the default way images are output from this "Insert picture" feature to allow the caption to be output as well?
Hi Alec
How do you render the chosen image now?
You need to fecth the caption property from your image. So please post some code - it will be much easier to guide you then :)
/Jan
The image is output by the native Umbraco "Insert picture" feature found in the WYSIWYG editor. If this output was handled by a scripting file I could add in a call to the "caption" field.
It might be better to output the picture with XSLT or Razor. Than you can read all the properties of the media item and show the caption.
Jeroen
Is there a way I can hook this WYSIWYG editor feature in to a Razor scripting file? How would I go about modifying the behaviour of this "Insert picture" feature?
Many thanks
You could try to change the html of the RichTextEditor in Razor with the Html Agility Pack. Something like this: http://our.umbraco.org/forum/developers/extending-umbraco/20810-Embed-image-in-email#comment78715
Jeroen
Thanks for that. So there's no way to intercept the default "Insert picture" feature to be output by a Razor scripting file that I can control instead? Any more information you can provide on your proposed solution would be appreciated.
is working on a reply...