Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Customize Knowledge Article css

(0) ShareShare
ReportReport
Posted on by

Hi,

I am trying to add knowledge articles. These knowledge articles are existing articles that we have available on our web site. These articles have existing style sheets that are linked to them eg:

<link href="http://xxxx/style.css" rel="stylesheet" />

I want to include the link tags in the HTML for the knowledge articles on the CRM. I have having difficulty understanding the logic. When I paste the links in to the HTML tab they seem to get stripped out:

CssStrippedOut.PNG

The links are valid, they are absolute links to the css from our web site. 

If i publish the article it seems to insert it's own style:

Published.PNG

How can I link to existing style sheets when adding a knowledge article? I have also tried adding the css as web resources, but this also seems to strip them out.

Thank you in advance.

Edit:

I have attempted to add the css as a Web Resource and add as a link but the editor still strips out the css link tag:

6278.2018_2D00_12_2D00_18_5F00_15_2D00_46_2D00_00.gif

*This post is locked for comments

  • John Kosobucki Profile Picture
    15 on at
    RE: Customize Knowledge Article css

    I am having this same issue.

    We are running D365 with multiple health clinics and we are trying to display clinic specific logos/ text in the KB articles based on the clinic the patient is associated with.

    Any suggestions welcome! Thanks

  • MikeC282 Profile Picture
    2,146 on at
    RE: Customize Knowledge Article css

    Anyone have any updates on this? It's still an issue. In terms of styling if I have the KB article exposed to Portal, have the KB HTML include references to CSS classes and add in the CSS to the Advanced tab of the Portal Web Page will this apply the CSS to the exposed KB article?

  • thatsneil Profile Picture
    on at
    RE: Customize Knowledge Article css

    Hi,

    I am stuck on this as well. In the article, in the content editor you can add a DIV tag, when you do this it allows you to specify a CSS class or classes. But it's unclear how this then links back to a CSS file. Haven't seen an example anywhere. My only thought is you have to load the css web resource via javascript on the article form but i'm hoping that is not the suggested approach.

    Neil

  • Community Member Profile Picture
    on at
    RE: Customize Knowledge Article css

    So, why Microsoft's documentation says that:

    4034.screen.png

  • Community Member Profile Picture
    on at
    RE: Customize Knowledge Article css

    Hi. The answer is that you cannot do it. There is security issues emailing.

  • Community Member Profile Picture
    on at
    RE: Customize Knowledge Article css

    Hello,

    did you solve this problem? I'm in the same situation. I cannot understand how to associate external CSS/JS to KB article

    Thanks

  • Community Member Profile Picture
    on at
    RE: Customize Knowledge Article css

    It also seems to happen to Javascript as well

  • PranavShroti Profile Picture
    4,510 on at
    RE: Customize Knowledge Article css

    interesting... did you try relative path as well...

  • Community Member Profile Picture
    on at
    RE: Customize Knowledge Article css

    Thanks Pranav,

    I have attempted this but the editor still strips out the css links. I have edited my original post and put in a GIF to demonstrate.

  • Suggested answer
    PranavShroti Profile Picture
    4,510 on at
    RE: Customize Knowledge Article css

    Try uploading your CSS files as web resource onto Dynamics apps then reference it using relative path.

    It should work.

    Check out this article:

    docs.microsoft.com/.../customer-service-hub-user-guide-knowledge-article

    As per this.

    You can’t use client-side code (script tags or JavaScript) in articles or emails. If you want to associate CSS or JavaScript, use web resources.

    Hope this helps.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
dkrishna Profile Picture

dkrishna 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans