web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Suggested answer
    PranavShroti Profile Picture
    4,510 on at

    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.

  • Community Member Profile Picture
    on at

    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.

  • PranavShroti Profile Picture
    4,510 on at

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

  • Community Member Profile Picture
    on at

    It also seems to happen to Javascript as well

  • Community Member Profile Picture
    on at

    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

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

  • Community Member Profile Picture
    on at

    So, why Microsoft's documentation says that:

    4034.screen.png

  • thatsneil Profile Picture
    on at

    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

  • MikeC282 Profile Picture
    2,175 on at

    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?

  • John Kosobucki Profile Picture
    15 on at

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans