Add external CSS classes

Stimulsoft Reports.JS discussion
Post Reply
Réda
Posts: 9
Joined: Wed Oct 26, 2022 11:33 am

Add external CSS classes

Post by Réda »

Hello,

I am using the text editor QuillJs to design some part of my report. Unfortunately, the editor produces custom classes in the final HTML that can't be interpreted by Stimulsoft.
Here is an example of the produced HTML :

Code: Select all

<p><span class="ql-size-huge" style="color: rgb(3, 139, 255);">Hello there !</span></p><p><br></p><p class="ql-indent-1"><strong>Hello World !</strong></p><p class="ql-indent-1"><br></p>
I would like to know if there is a way to add custom CSS classes (by using a config file for example ?) in Stimulsoft, in order for the report to understand and render properly these classes ?

Best regards,

Réda.
Lech Kulikowski
Posts: 6238
Joined: Tue Mar 20, 2018 5:34 am

Re: Add external CSS classes

Post by Lech Kulikowski »

Hello,

Unfortunately, it is not possible.

Thank you.
Réda
Posts: 9
Joined: Wed Oct 26, 2022 11:33 am

Re: Add external CSS classes

Post by Réda »

Okay nevermind. I managed to turn my custom classes into inline styles. Now the problem is the rendered report doesn't seem to apply margin styles to elements that are inside of a textblock...
Here is an example :

Code: Select all

<div style="margin-left: 100px;"><u style="font-size: 32px; color: rgb(3, 139, 255);">HUGE </u></div>
Is it due to the fact that I'm using a div tag ? If so, how can I handle left and right margins please ?
Lech Kulikowski
Posts: 6238
Joined: Tue Mar 20, 2018 5:34 am

Re: Add external CSS classes

Post by Lech Kulikowski »

Hello,

Please check the supported HTML tags:
https://www.stimulsoft.com/en/documenta ... l_tags.htm

Thank you.
Réda
Posts: 9
Joined: Wed Oct 26, 2022 11:33 am

Re: Add external CSS classes

Post by Réda »

Okay, I guess I will have to use white-spaces for margins then.
Thanks
Lech Kulikowski
Posts: 6238
Joined: Tue Mar 20, 2018 5:34 am

Re: Add external CSS classes

Post by Lech Kulikowski »

Hello,

You are welcome.
Post Reply