Copied to clipboard

Flag this post as spam?

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


  • David Peck 690 posts 1896 karma points c-trib
    Jul 12, 2012 @ 17:43
    David Peck
    0

    Creating tooltips in TinyMCE

    My client wants to be able use jQuery tooltip, containing texts and sometimes an image like this. http://jquery.bassistance.de/tooltip/demo/

    I've got no problem integrating the jQuery plugin, but I can't work out how best to get them to enter the content through TinyMCE. Any ideas? I don't really want to ask them to write HTML or my own made up syntax.

  • David Peck 690 posts 1896 karma points c-trib
    Jul 12, 2012 @ 19:16
    David Peck
    1

    Don't worry. Think I got it, which I'll write for any future needs.

    I'll just use the standard link button to create an a tag with a title attribute. I can use the title attribute to populate the tool tip's text and if the href is pointing to an image then I'll add the image to the tooltip too. In order to identify the tooltip links I added a CSS style to TinyMCE's list of styles and my client will have to classify each of the tooltips.

    If this turns out not to give my client enough flexibility I can allow them to use the link button to select a page which just contains the content of the tooltip and I'll use AJAX to grab the content when the tooltip loads, or perhaps output the HTML in advance in a hidden div on the page. Bosh!

  • Brendan Rice 538 posts 1102 karma points
    Jul 16, 2012 @ 00:54
    Brendan Rice
    0

    Hey David, that is how I would have approached it as well, cheers for sharing the solution.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies