问题
如何使用帮助中心文章编辑器工具栏中的源代码 () 选项设置文章的文本格式?
回答
使用帮助中心的文章编辑器工具栏可以设置文章格式。通过源代码功能,您可以应用 HTML 标签来丰富文本格式。
下表列出了可在文章中使用的 HTML 标签。
块引用 | <blockquote>block quote text here</blockquote> |
预格式化的文本 | <pre>pre-formatted text here</pre> |
标题 |
<h1>header text here</h1> (h1 最大,h6 最小) |
上标 | <sup>superscript text here</sup> |
下标 | <sub>subscript text here</sub> |
删除线 | <strike>strikethrough text</strike> |
缩进 |
<p style="padding-left: 30px;">Indented text here</p> 修改像素数(例如 35px)以更改缩进量 |
内嵌代码 | <code>snippet here</code> |
突出显示 | <mark>highlighted text here</mark> |
以下屏幕截图显示了上述 HTML 如何在帮助中心呈现文本。
以上并非可以添加到文章中的所有 HTML 元素,但列出了常见用例。如果 HTML 标签和属性未正确显示,可能需要调整设置。
有关更多信息,请参阅文章:编辑帮助中心文章的源代码。
23 条评论
齋藤成志
Hello Ricardo Pinto,
Regarding the HTML `strike` tag explained in the `Strikethrough` section of this page, while it works in preview, it did not function in the production environment.
<strike>strikethrough text</strike>
Since the
<strike>
tag has been deprecated in HTML5, I think it would be better to change it to something else like<del>
.In fact, when I changed it to
<del>
, it worked properly.0
Zsa Trias
Hello Jennifer,
It looks like there are two different types of double-quotes used in your code, which is why it's not working properly.
One is the straight, plain text quotes, and the other is curvy "Smart quotes" which causes the coding to break.
Can you please try re-formatting your code and use only the plain text quotes (" ") instead?
0
Jennifer P
Hey Sierra/Everyone,
Hoping someone can help me.
I tried adding the link on the home_page.hbs file like so:
<p class="hero-text">Call <a class="hero-link" href=“tel:123-456-7890”>123-456-7890</a> for Support</p>
Clicking on the link takes me to zendesk 404 error page.
Did you take any additional steps to get it to work? I've also gone to settings --> Guide Settings --> Security and checked the box for Display Unsafe Content which was suggested in another help article.
0
Sierra Collins
It only works in the edit code. I tested it in the edit code of the home page and it works.
0
Ifra Saqlain
Hi Sierra Collins,
Do the following:-
i). Open source code of an article.
ii). Write your phone number with anchor tag like this.
iii). Click OK button.
iv). Save your article which you have been edit for this.
v). Now, your number would be dial by a click.
Thanks
Team
0
Sierra Collins
Hello, how do I edit source code for a phone number within an article? So the phone number can be dialed by clicking the linked number.
0
Ifra Saqlain
Hey ,
Just do the following:
i). Copy paste the code to your script.js file. You will need to add your URLs as mentioned below.
ii). jquery CDN to document_head.hbs file.
Thanks
0
Lisa Sedlak
I have a question. How can I make it so when someone clicks on an article in a section, that it goes to another website?
0
Dave Dyson
It's likely that you're using HTML tags or attributes that are considered "unsafe". There's information this, and how to allow unsafe HTML, here: Allowing unsafe HTML in help center articles
0
Fernando Fischer
Question guys, I am trying to add border to images and add some text that will be hidden to the user but searchable to the engine, using the code snippet and inline styling, and all works just fine in the editor but not in the preview, or when I am publishing it, I am doing something wrong? thank you in advance.
0
登录以发表评论。