MyBB Community Forums

Full Version: Insert tooltip inside a post with mycode.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
The main issue with both is the regular expression, as you might want to stop users from inserting HTML while still allowing them to use MyCode inside, for which you might be better off with a plugin.
Not working. I try on my test board with 'HTML in post' plugin also but not working.
Please test it in a fresh board first, it might be an issue with your theme.
Yes, I tested on fresh copy and it works BUT it is not accepting something in one post. see image.
https://prnt.sc/vgkfh1
The regular expression only allows for limited characters, what exactly do you want to allow as tooltips? Only text? HTML? MyCode?
(2020-11-10, 10:31 AM)Omar G. Wrote: [ -> ]The regular expression only allows for limited characters, what exactly do you want to allow as tooltips? Only text? HTML? MyCode?

I need unlimited Text words and URL, bold,color, italic , etc..(BBCodes) inside the tooltip with selectable text and click on a link should open that link in another window and tooltip should remain open until I click that tooltip word again or click outside popup message. At present, tooltip word is hidden by popup message and also adding URL link break the tooltip.

One issue is that if I edit anything in the post where I added tooltip, then I have to refresh the page to make tooltip working.

Is it safe to use HTML in post plugin with permission only to superadmin means UID 1?
Thanks, Omar.
Hi, you can change the Regular Expression to: \[tooltip=([a-z0-9_\- ,.+]+)\](.+?)\[/tooltip\]

But this might be dangerous, I would recommend you to get a plugin instead.
Also, a tooltip is usually visible on hover, and disappears once you move your mouse out the scope of the element. If you want to make it on click you will need to slightly modify the JS code.
Which plugin needed for this?
Thanks
you should just load jquery tooltip
Pages: 1 2