function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SFgruntSFgrunt 

KB article creation is not WYSIWYG

Wondering if anyone can shed some light on some issues my team and I are having creating KBs in SF Knowledge.

KB Articles created in our (for now) non-public KB have some painful formatting issues we are unable to resolve.

One example is when we create a code block with linux lines to be appended to a end-user config file, if the code block text resembles a URL (typically, it seems "http://" is the trigger), the published KB is rendered with that text in the code block with "href" instead of simple text. Here is an example of what we enter into the code block:

export http_proxy="http://proxyuser:proxypass@proxyIPaddress:proxyPort/"
export https_proxy="http://proxyuser:proxypass@proxyIPaddress:proxyPort/"

Here is a code block rendered in this community forum :

export http_proxy="http://proxyuser:proxypass@proxyIPaddress:proxyPort/"
export https_proxy="http://proxyuser:proxypass@proxyIPaddress:proxyPort/"
When the above code block is rendered in our SF KB, it will have two trailing quotes thanks to the "href", resulting in a syntactically-incorrect code block:
CodeBlockExample1
It seems that KB is pasring what it thinks are URLs in code blocks, and this should not be.

Another issue relates to formatting of URLs when we want them to be displayed with the "href" but they aren't, for unknown reasons.

Rendered KB:
User-added image
Despite the black text, each of these links are formatted in the editor exactly the same, but when renderted, despite being clickable, they are not colored as clickable URLs should be.
 
SwethaSwetha (Salesforce Developers) 
HI Graham,
A similar ask was posted here https://salesforce.stackexchange.com/questions/350505/knowledge-articles-href-is-overridden-for-tel-links

See related https://help.salesforce.com/s/articleView?id=sf.fields_using_html_editor.htm&type=5

Thanks
SFgruntSFgrunt
Hi Swetha,

Thank you for your effort in researching somewhat-related searches, but I fail to see how your supplied links are related to my query.

Our problems are:
  1. Any string in a code block that resembles a URL is converted to a blue underlined link, which is undesired in a code block/snippet, and in the case of code with quotes around a URL, adds extra quotes, breaking syntax.
  2. URLs added using the Rich Text Editor link feature are not all rendered equally, leaving some links clickable, but not blue or underlined.
You supplied a query from SE related to unsupported link types (tel:) and a description of the rich text editor that explains basci concepts, such as, "We recommend that you use the toolbar to format your content..." and neither of the links you supplied -- while tangentially related to my post title --  are actually related or helpful with this problem.

Thank you, and take care.
briane herrybriane herry
Here is a step-by-step guide for taking the TellHappyStar Customer Survey.