Copied to clipboard

Flag this post as spam?

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


  • Carl Bembridge 6 posts 26 karma points
    Jun 08, 2015 @ 15:54
    Carl Bembridge
    0

    Image in RTE, choose a class/Alignment

    Hello!

    Is there anyway to add a HTML class to an image when adding it to the RTE? When using the image picker, it let's us choose an image, but I'd like a way for authors to be able to choose a class for that image, which would determine how it displays on the front end of the site.

    For example, pick an image, then select either "Full width, Left align, Right align" etc and that would apply a class of, for example, "right-align" to the image in the HTML code.

    Any idea's how I can achieve this?

    Many thanks

  • Alex Skrypnyk 6162 posts 24132 karma points MVP 8x admin c-trib
    Jun 08, 2015 @ 16:45
    Alex Skrypnyk
    0

    Hi Carl,

    It's common task in content editing, and Umbraco makes it easy.

    There few ways to do that :

    1) RTE has 3 buttons om the navigation panel 'Align left', 'Align center' and 'Align right'.

    2) Add custom css classes and then add them to images.

    3) Open source code of RTE field and edit it as you want )

    THanks, Alex

  • Carl Bembridge 6 posts 26 karma points
    Jun 09, 2015 @ 09:11
    Carl Bembridge
    0

    Hi Alex,

    Thanks for your response, I hadn't noticed the Alignment buttons worked on images! That does just float the images though, so I'm more interested in the second option - you mentioned you could add classes to images, how does this work (other than editing the source code)?

    Many thanks

    Carl

  • Alex Skrypnyk 6162 posts 24132 karma points MVP 8x admin c-trib
    Jun 09, 2015 @ 09:15
  • Carl Bembridge 6 posts 26 karma points
    Jun 09, 2015 @ 09:23
    Carl Bembridge
    0

    Thanks Alex,

    Appreciate your help :-)

    Carl

Please Sign in or register to post replies

Write your reply to:

Draft