cancel
Showing results for 
Search instead for 
Did you mean: 

How can I change the font in html-file

Former Member
0 Kudos

Hello,

if I create a new html-file in KM-Content - Folder - New - Html-File, I always get the font Times New Roman. In the editor I have Arial oder something similar - but not in the view.

Does anybody know how to change this font to Arial? Where do I have to configure what? Thanks

Regards,

Susanne

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

What worked for me was changing the stylesheet path to:

/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/etc/public/mimes/css/wcm.css

Hope this helps!

Kind regards, Hilco Broens

detlev_beutner
Active Contributor
0 Kudos

Hi Susanne,

the html editor at the moment has no font property to set. So if you have a look at the html source, you'll see that it's quite "pure" html.

> I always get the font Times New Roman

You don't get any explicit font. It just shows up in the browsers default font.

To achieve a certain style, you would have to filter the html by a stylesheet with the help of a stylesheet filter, see http://help.sap.com/saphelp_ep50sp5/helpdata/en/a8/923717bc40dd49b1e296b9877e98f0/frameset.htm

Hope it helps

Detlev

Former Member
0 Kudos

Hello Detlev,

it doesn´t work like you wrote (we use EP6 NW04 SPS 09).

I copied the wcm.css (must be delivered from SAP) and changed it. I created a new Html-Stylesheet-Filter like in the SAP-Help. We restarted the engine and I opened the html-file in KM-Content. There is still Times New Roman. I also created a new file but it´s the same.

I read in the SAP-Help that you have to use a HTML Filter for Portal Stylesheets if you create html-docs with the editor. But I can´t find this filter in Content Management - Repository Filters - HTML Filter for Portal Stylesheets. Is this option only available in special Portalversions?

Regards,

Susanne

detlev_beutner
Active Contributor
0 Kudos

Hi Susanne,

it doesn´t work like you wrote

Hmmm. As a mathematician, I like it to be precise, and I also like other people to be. As a combination of being precise and polite, your sentence could have been something like "I didn't get it working, I'm too dumb <cryin'>"

Of course it works like I wrote. If you are on NW04 / SPS9, click "Show advanced options" when clicking on Content Management - Repository Filters. Then the category "HTML Stylesheet Filter" will appear (this is what "HTML Filter for Portal Stylesheets" means), within this the stylesheet filter "css" is to be found. Again, press "Show advanced options" to see the "Active" option (it's not activated from standard). If you create / activate such a stylesheet filter, afterwards you will have to restart the portal (seems as you know).

If you have done this, still you will have no explicit font, because the wcm.css doesn't contain a standard font. You will have to add for example something like

body { font-family:Arial; }

to the css.

You can check if the filter works (once again: of course it works, I just tested it on a SPS9 portal) by looking at the rendered html source, which has to contain something like <LINK REL="stylesheet" TYPE="text/css" href="https://answers.sap.com/wcm/etc/public/mimes/css/wcm.css" TITLE="Style">.

Hope it helps

Detlev

Former Member
0 Kudos

Hey Detlef,

I´m sorry that I´m no mathematician or a SAP EP-consultant. So "dumb" is maybe the wrong word.

>Then the category "HTML Stylesheet Filter" will appear (this is what "HTML Filter for Portal Stylesheets" means)

How can a non-SAP-person can know what that means? Sorry but I´m almost new to EP and therefor I don´t have that much knowledge how SAP designate their options.

I tried it again and just did it like you said but sorry - it´s still not working. If I check the document there is no css-part included. Is there anything else I have to configure anywhere?

Thanks Susanne

detlev_beutner
Active Contributor
0 Kudos

Hu Susanne,

Detlef

"Say Detlef once again" (Detle

v

)

sorry that I´m no mathematician or a SAP EP-consultant

Never mind!

So "dumb" is maybe the wrong word

You didn't realize the ";-)" behind it?!

It's just that this strict "it doesn´t work like you wrote" was a bit irritating, in fact it works, it's tested on the same version as you are on, and it's also not a very new feature (new features often are buggy at some ends).

But now I had a second look on the link I have given - and sorry, even if it should help, in fact it was the EP50-version. The NW04 version, which seems you have already detected by yourself, is http://help.sap.com/saphelp_nw04/helpdata/en/a8/923717bc40dd49b1e296b9877e98f0/frameset.htm

After having seen this, I also found this ominous description of "HTML Filter for Portal Stylesheets"http://help.sap.com/saphelp_nw04/helpdata/en/cc/b8f941db015f24e10000000a1550b0/frameset.htm

Yes, this does in fact not exist on EP6 SP9. You could open an OSS message and ask to delete the description of a non-existing feature or for delivery of it.

Anyhow, it shouldn't do more than the HTML Stylesheet Filters are already doing - maybe it would choose the corresponding CSS by itself?

Is there anything else I have to configure anywhere?

The prerequisity is "The publishing pipeline is configured appropriately.", but this should be the case by default.

The repository used is "documents" and the html file you have been using is stored in this repository?

The stylesheet exists on the location set within the stylesheet configuration?

There are not sooo many screws to turn...?!

Hope it helps

Detlev

Former Member
0 Kudos

Hi Detlev,

I´m so sorry because of the "f" Can you forgive me?

Yes I realized the behind the dumb. It is just because nothing works in this Portal-Thing. Don´t matter what we want to do - first you have to configure 5 other things that this one thing works. And the result is that this one thing doesn´t work at all.

Well, back to my problem

Here are the details of my filter - maybe you can see a wrong entry:

Name: html

Active: yes

Repositories: documents

Extensions: html

MIME Types: text/html

Paths: /test

Stylesheet: /wcm/etc/filter/public/mimes/css/html.css

Thanks again Detlev

detlev_beutner
Active Contributor
0 Kudos

Hi Susanne,

> Can you forgive me?

Yes, no, yes, no, yes, no... yes! Puh

> nothing works in this Portal-Thing

Yeah, this is why I wrote <cryin'>

> first you have to configure 5 other things

> that this one thing works

Beneath things which are buggy (and to certain extend untested, which is sometimes really annoying) one has to admit that many things within EP6 are very high configurable and provide fine tuned customization. This flexibility on the other side has it's price (complexity), but once you get familiar with it, you will like it (at least some things) - and: you'll be proud of knowing things others don't

> Here are the details of my filter

If things do not work, I always preach to reduce complexity to a minimum ==>

- Kill the entry for Paths ("If you leave this entry field empty, the filter is applied to all paths.")

- Kill the entry for Extensions ("If you leave this entry field empty, the filter is applied to all extensions.")

The problem I expect is your entry for Paths (must be "/test/*", I expect without being sure), see http://help.sap.com/saphelp_nw04/helpdata/en/ac/940c285a2f9b4984e1cb3113a8a9d3/frameset.htm

Hope it helps

Detlev

Former Member
0 Kudos

Hey Detlev,

well it still does not work. I killed the path and extensions entry and restarted the engine maybe 50 times But there is no Arial in my html documents.

I´m trying another way. Maybe we can change the standard-font of the IE with our Windows-Login-Script for all users. So everyone will be happy then with Arial

But thank you anyway and have a nice evening!

CU, Susanne

detlev_beutner
Active Contributor
0 Kudos

Hi Susanne,

> But there is no Arial in my html documents.

Did you check the html source if at least a css reference has been rendered into it?

If not, I would deactivate your "html" renderer and activate the predefined "css" renderer with the default css in it's default location.

It's really one of the more straight and easy issues within KM... it should run (and it does on our version).

Hope it helps

Detlev

Former Member
0 Kudos

Hi Detlev,

it still doesn´t work.

I used the delivered wcm.css (there is arial included) and the css-link is standing in the source code of the document just like you wrote. And I still get Times New Roman.

Our SAP Consultant wrote that he will see if he can find something when he´s at our company the next time.

Thank you anyway,

Susanne

0 Kudos

Hi Susanne,

I just wanted to mention to you that staring with SPS 11

the filter will automatically be set, essentially

eliminating the problem you originally described.

In SPS 10, the HTML editor also got a bit of a facelift,

and was enhanced a bit.

Regards,

Darin Krasle

Former Member
0 Kudos

Hi Darin,

thank you for the information.

Since SPS11 is new and not really tested by lot of users we will wait some weeks longer before we install it.

Kind regards,

Susanne

detlev_beutner
Active Contributor
0 Kudos

Hi Susanne,

> the css-link is standing in the source code

> of the document just like you wrote

Wow, than at least the filter works!?!

When this is integrated, it is no longer a question of the filter but a question of the css.

In the default wcm.css, the whole style is commented out, I expect that's this also the case on your site.

Deleting the two out-commending lines (start & end), in the end you will have have success...

Hooo, this was a long story... I hope that now points are raining...

Hope we've solved the problem

Detlev

Former Member
0 Kudos

Hello Detlev,

sorry that I have to destroy your illusion. It does not work.

I copied the delivered wcm.css

I deleted the out-commending lines ( <!- ..... --> )

I add the font type arial to the body-style

I created a html-stylesheet-filter (without path and extensions)

I restarted the engine several times

I created a new html-document in \documents

I deleted the browser cache

What else do I have to do?!? Maybe we should just prohibit the use of the html-editor

Regards,

Susanne