Copied to clipboard

Flag this post as spam?

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


  • Maulik Dhaduk 15 posts 135 karma points
    Aug 25, 2022 @ 11:51
    Maulik Dhaduk
    0

    I want to add Tooltip on hover on image from Umbraco Backoffice Richtextbox Editor

    I want one tooltip option in Umbraco rich textbox editor from where other user can add tooltip description on selectio of image as shown in image below: enter image description here

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Aug 25, 2022 @ 15:51
    Huw Reddick
    100

    Hi Maulik,

    It can be done but I'm afraid it isn't all that easy (not everything is in Umbraco)

    What I did in ours was to add a tooltip style format in custom config which when applied wraps the image in a href tag with some data attributes to mark as a tooltip and allow html.

      "RichTextEditor": {
        "CustomConfig": {
          "style_formats": "[{\"title\":\"Image\",\"items\":[{\"title\":\"tooltip\",\"inline\":\"a\",\"attributes\":{\"data-toggle\":\"tooltip\",\"data-html\":\"true\",\"href\":\"#\"}}]}]"
        }
      },
    

    You can then click on the image and give the link a title which gets displayed as a tooltip for the image.

    It's a bit hacky but it worked for what the customer wanted.

Please Sign in or register to post replies

Write your reply to:

Draft