Page 1 of 1

Gallery - Description box

Posted: 29 Jul 2024, 10:13
by ClaudioMaffucci
Hi,
Can I format the text in the 'Description' box?
Thank you in advance for your support.
Regards,
Claudio

Re: Gallery - Description box

Posted: 29 Jul 2024, 23:50
by mjau-mjau
Hi Claudio,
ClaudioMaffucci wrote:Can I format the text in the 'Description' box?
The "Description" field supports basic html text formatting tags like <strong><em><br><span style="color:#990000"> etc. For example:
Code
<strong>This is some important information</strong>
<br>
<br>
This text is <em>emphasized</em>. And <span style="color: #990000">this is red color</span>, bye!

Re: Gallery - Description box

Posted: 30 Jul 2024, 09:41
by nampara17
Can we use <div>'s and classes?

Re: Gallery - Description box

Posted: 30 Jul 2024, 23:10
by mjau-mjau
nampara17 wrote: Can we use <div>'s and classes?
<div> no, because it's block-level element, and isn't technically allowed by html (browsers) to go inside inline elements like <p> paragraphs. However, why not just use <span> instead of <div>? There is nothing you can do with <div> that you can't do with <span>.

You can use classes yes.
Code
<span class="myclass"></span>
You need to be careful about what you do with styles though. Remember, the description may display in the layout and in the popup, so you can't add styles that look nice in one place but not the other ... Unless you only display descriptions in the popup for example. That's why by default, formatting should be limited to "rich text formatting" (colors, fonts, bold, italic etc).

Re: Gallery - Description box

Posted: 02 Aug 2024, 03:45
by ClaudioMaffucci
mjau-mjau wrote: Hi Claudio,
ClaudioMaffucci wrote:Can I format the text in the 'Description' box?
The "Description" field supports basic html text formatting tags like <strong><em><br><span style="color:#990000"> etc. For example:
Code
<strong>This is some important information</strong>
<br>
<br>
This text is <em>emphasized</em>. And <span style="color: #990000">this is red color</span>, bye!
Thank you very much for the support.
Regards,
Claudio