0

While adding the featured image of an article (Intro Image and Full Article Image), I need to add some simple HTML to the Caption field, since these captions contain scientific names, that must be displayed in italic.

Joomla strips the HTML from the form, and I was wondering if there is a way to allow HTML, or only some given HTML tags.

I've found this answer https://stackoverflow.com/a/18196105/302076 but the changes that need to be made are not fully explained.

1
  • Usually, you just need some CSS, to display text in italics and not html.
    – FFrewin
    Nov 9, 2017 at 12:46

1 Answer 1

3

The issue with the answer given in that other question is that it requires edits to Joomla core files so site updates eventually will undo your changes. That'll create a maintenance issue for you (ie, you'd need to check all those edited files after every Joomla update and re-apply the changes if they were un-done).

If you always need the entire caption in italics then FFrewin's comment is the best route (make a CSS edit so that captions are always italic).

If you only want parts of the caption in italic and you don't want to worry about core edits then you'd probably need to find/create a Plugin that'll convert bbcode type markup into HTML for you. Then you could set captions such as:

This Argentine horned frog ([i]Ceratophrys ornata[/i]) has a weight problem.

I'm not sure if such a plugin exists already but if not it would be easy to create. update: RokCandy might do what you need.

2
  • I've tried with Rokcandy... But... Yes, the markup gets converted to html, but the html part of the caption is not interpreted as HTML. The page displays caption <em>lalala</em> more caption.
    – dolma33
    Nov 15, 2017 at 18:24
  • Make sure the plugin orders are correct, sometimes that can effect whether things work properly. Try sticking RokCandy last
    – Eoin
    Jul 3, 2021 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.