Formattextext <style> tag

Posted by: roland.lee on 2 May 2024, 3:19 am EST

    • Post Options:
    • Link

    Posted 2 May 2024, 3:19 am EST

    hello.

    according to the documentation - https://developer.mescius.com/activereportsnet/docs/latest/online/formattedtext.html we are able to add a style tag in the formattedtext. Can we put in classes then in here for the html we insert?

    So something like -

    <style>
    .bold{
    font-weight: bold;
    }
    <div class="bold">Test</div>
    <style> 
    

    I was also looking at stylesheets but these are specific to report controls vs the actual html no?

    Thanks in advance.

    Roland

  • Posted 2 May 2024, 7:58 pm EST

    Hi Roland,

    Yes, you can add classes as well as style tags within the HTML for FormattedText, just make sure the components are bound within the <body> & </body> tags as in this case, you have placed the div element within the style tag itself, so your code should look like:

    <style>
        .bold{
        font-weight: bold;
        }
    </style>
    <body>
        <div class="bold">Test</div>
        <br/>
        <div>Normal</div>
    </body>
    

    Please find attached a sample implementing the same.

    Regards,

    Anand

    FormattedTextSample.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels