Tooltip Display Content

Support General Tooltip Display ContentResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #21351
    @mindspark@mindspark
    Participant

    Hi Metabox!

    Right now, when I add a tooltip attribute to a field, the text is displayed as expected. But I would like to add an image or a video URL in the tooltip.

    Is there a way to override the field display properties? I think it is set to only accept text characters... but what about HTML?

    Thanks!

    #21354
    @mindspark@mindspark
    Participant

    I figured it out! For others looking for the answer, see below:

    In order to allow a tooltip to accept HTML, do this -

    1. Go to Custom Attributes and create a new Tooltip

    Field > Custom Attributes

    Key = tooltip
    Value = Tooltip text. <add your HTML>

    1. Then add a new custom attribute below the first tooltip attribute like this

    Key = allow_html
    Value = true

    By adding the second attribute for "allow_html = true" then Tooltips will now accept HTML.

    #21355
    Long NguyenLong Nguyen
    Moderator

    Hi,

    The extension MB Tooltip v1.1.3 supports to show the HTML code in the content.

    array(
        'id' => 'name',
        'type' => 'text',
        'name' => 'Name',
        'tooltip' => array(
            'icon'     => 'help',
            'content'  => '<img src="https://homepages.cae.wisc.edu/~ece533/images/airplane.png" alt="image alt" width="100px" height="100px">',
            'position' => 'top',
        ),
    ),

    For more information, please follow this documentation https://docs.metabox.io/extensions/meta-box-tooltip/.

    #28161
    @mindspark@mindspark
    Participant

    thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.