web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer Service forum

CSS and Knowledge Articles

(0) ShareShare
ReportReport
Posted on by

Hi,

when formatting a knowledge article in D365 you have the option to add a div and reference some custom CSS. But how can you make this work? Do you have to add the CSS as a web resource then insert this via Javascript so it is used when the Knowledge article form is loaded?

Thanks,

Neil

Categories:
I have the same question (0)
  • LeoAlt Profile Picture
    16,331 Moderator on at

    Hi partner,

    If we want to apply a css file to knowledge, we should link the knowledge to it by code.

    community485.png

    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/css-web-resources

    I tried in my instance and it worked well.

    1.Create a new css file to web resources and copy the url.

    community484.png

    Here is my css style.

    .mystyle{
        font-size: 10px;
        font-weight: bold
    }


    2.Create a new knowledge article and link to the css we've just added with js.

    community486.png

    3.Preview the effect.

    community485.png

    Hope it helps.

    Best Regards,

    Leo

  • thatsneil Profile Picture
    on at

    Hi,

    we can do this as well but i think you will find the second you save that article the link to the css will be stripped out, give it a go and you will see what i mean.

    Neil

  • LeoAlt Profile Picture
    16,331 Moderator on at

    Hi partner,

    Sorry for my carelessness. I tried in my instance and the css link disappeared. It's a very strange situation and I have raised a ticket to Microsoft for more help.

    Here is the ticket ID:119052723000981

    I will notice you immediately if there is any new information.

    Best Regards,

    Leo

  • thatsneil Profile Picture
    on at

    Hi Leo, any news on this?

    Thanks,

    Neil

  • Johnny Gong Profile Picture
    6,482 Moderator on at

    Hi thatsneil,

    Sorry for the late reply. Leo is on a honeymoon. I will help him follow the case.

    Dev Team has already replied to our escalation: This behavior is as per the design of the Knowledge Article entity. The Knowledge Article entity doesn't allow storage of any unsafe HTML including links, scripts, etc.

    I think above info could help you resolve mentioned question.

    While we could repro that the published web resource still could not be normally referred in Knowledge Article entity HTML. The link still would be be removed automatically by system after saving the form. So we are still in investigation with Dev on web resources reference topic. Thanks.

    Regards

    Johnny

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Customer Service

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans