Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Alec Rust 11 posts 31 karma points
    Feb 06, 2013 @ 15:44
    Alec Rust
    0

    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?

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 06, 2013 @ 19:10
    Jan Skovgaard
    0

    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

  • Alec Rust 11 posts 31 karma points
    Feb 06, 2013 @ 22:38
    Alec Rust
    0

    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.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Feb 07, 2013 @ 13:18
    Jeroen Breuer
    0

    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

  • Alec Rust 11 posts 31 karma points
    Feb 07, 2013 @ 13:38
    Alec Rust
    0

    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

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Feb 07, 2013 @ 13:42
    Jeroen Breuer
    0

    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

  • Alec Rust 11 posts 31 karma points
    Feb 07, 2013 @ 15:19
    Alec Rust
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft