Comments on: Custom CSS style sheets in non-CMS pages https://servicenowguru.com/system-ui/custom-stylesheets-noncms-pages/ ServiceNow Consulting Scripting Administration Development Tue, 28 May 2024 19:38:02 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Robert Polickoski https://servicenowguru.com/system-ui/custom-stylesheets-noncms-pages/#comment-9416 Mon, 04 May 2015 15:06:35 +0000 https://servicenowguru.wpengine.com/?p=4667#comment-9416 It would appear that the HTML Editor in Knowledge Base and the Service Request Description will not save any or <g:call) tags.
So it seems this solution is no longer valid for Eureka.

]]>
By: Jim Marchant https://servicenowguru.com/system-ui/custom-stylesheets-noncms-pages/#comment-9415 Wed, 27 Aug 2014 18:50:50 +0000 https://servicenowguru.wpengine.com/?p=4667#comment-9415 In reply to Mark Stanger.

here’s the link href, without open/close brackets:
link href=”/nav_to.do?uri=content_css.do?sys_id=b88da8986ff2ed006566511aaa3ee463″ rel=”stylesheet” type=”text/css”

]]>
By: Jim Marchant https://servicenowguru.com/system-ui/custom-stylesheets-noncms-pages/#comment-9414 Wed, 27 Aug 2014 16:09:05 +0000 https://servicenowguru.wpengine.com/?p=4667#comment-9414 In reply to Mark Stanger.

I came up with an alternative/workaround:
Saved the URL of the stylesheet and used it as the href instead. The editor stripped out the first part of the URL, leaving

The question marks embedded in this string are not stripped and it works … sorta.
Now my obstacle appears to be the caching. Drat, will have to enlist a javascripter. :-)

]]>
By: Mark Stanger https://servicenowguru.com/system-ui/custom-stylesheets-noncms-pages/#comment-9413 Tue, 26 Aug 2014 23:03:10 +0000 https://servicenowguru.wpengine.com/?p=4667#comment-9413 In reply to Jim Marchant.

You can always put it in the ‘kb_view_custom’ macro and use it globally. Aside from that, I think you’ll probably need to contact ServiceNow to see why the editor is stripping those characters out.

]]>
By: Jim Marchant https://servicenowguru.com/system-ui/custom-stylesheets-noncms-pages/#comment-9412 Tue, 26 Aug 2014 22:56:59 +0000 https://servicenowguru.wpengine.com/?p=4667#comment-9412 When I add the href to a KB article in the HTML source editor, after saving it strips out the “?” character at the end of the link, rendering it useless.
We’re on Dublin.

]]>
By: Mark Stanger https://servicenowguru.com/system-ui/custom-stylesheets-noncms-pages/#comment-9411 Thu, 03 Apr 2014 14:33:20 +0000 https://servicenowguru.wpengine.com/?p=4667#comment-9411 In reply to Valérie Gallot.

What the TinyMCE editor does cannot be changed, but if it’s adding HTML tags and you have CSS styles set up for those tags then the CSS will apply to that tag.

]]>
By: Valérie Gallot https://servicenowguru.com/system-ui/custom-stylesheets-noncms-pages/#comment-9410 Thu, 03 Apr 2014 14:28:36 +0000 https://servicenowguru.wpengine.com/?p=4667#comment-9410 Hi Mark,
Thank you for sharing that.
I just need to customize the default styles that are proposed by TinyMCE editor (header 1, header 2, address, paragraph, preformatted)… or define new styles if it is a better approach…
The idea is to facilitate the article writers’ job (Knowledge management).
If I create my own style sheet as you describe, and add the href by default as the text value for a new article, will the TinyMCE editor propose these styles in the toolbar?
Thanks!
Valérie

]]>
By: Ash https://servicenowguru.com/system-ui/custom-stylesheets-noncms-pages/#comment-9409 Tue, 15 Oct 2013 10:49:08 +0000 https://servicenowguru.wpengine.com/?p=4667#comment-9409 Hi Mark,

How can we fix the header of related list?

]]>
By: Akeel Nazir https://servicenowguru.com/system-ui/custom-stylesheets-noncms-pages/#comment-9408 Tue, 29 Jan 2013 11:35:49 +0000 https://servicenowguru.wpengine.com/?p=4667#comment-9408 Hi Mark,

You could store the themes/CSS in another custom table which will have just a large text field and get CSS from this custom table and applying it for instance on a UI page.

Here is a snippet.



var gr=new GlideRecord('u_custom_themes');
gr.query();

var status = 'No record found in Dashboard Themes table';

while (gr.next()) {
var theme_css = gr.u_css;
}

]]>
By: Mark Stanger https://servicenowguru.com/system-ui/custom-stylesheets-noncms-pages/#comment-9407 Mon, 03 Dec 2012 22:10:50 +0000 https://servicenowguru.wpengine.com/?p=4667#comment-9407 In reply to Chris Hann.

Thanks Chris! That’s good information to know.

]]>