Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add advanced formatting help to seeds #1212

Merged
merged 6 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions db/seeds/posts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,10 @@
body: $FILE posts/deleted.html
doc_slug: deleted
help_category: Site Information

- post_type_id: <%= HelpDoc.post_type_id %>
title: Advanced formatting help
body_markdown: $FILE posts/advanced-formatting.html
body: $FILE posts/advanced-formatting.html
doc_slug: advanced-formatting
help_category: Site Information
86 changes: 86 additions & 0 deletions db/seeds/posts/advanced-formatting.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<p
>Posts on Codidact, including questions, answers, articles, tag wikis, help pages, and user
profiles, support the use of the following HTML tags:</p
>
<ul>
<li><code>a</code></li>
<li><code>p</code></li>
<li><code>span</code></li>
<li><code>b</code></li>
<li><code>i</code></li>
<li><code>em</code></li>
<li><code>s</code></li>
<li><code>strong</code></li>
<li><code>hr</code></li>
<li
><code>h1</code>, <code>h2</code>, <code>h3</code>, <code>h4</code>, <code>h5</code>,
<code>h6</code></li
>
<li><code>blockquote</code></li>
<li><code>img</code></li>
<li><code>strike</code></li>
<li><code>del</code>, <code>ins</code></li>
<li><code>code</code></li>
<li><code>pre</code></li>
<li><code>br</code></li>
<li><code>ul</code>, <code>ol</code>, <code>li</code></li>
<li><code>sup</code>, <code>sub</code></li>
<li><code>section</code></li>
<li><code>details</code>, <code>summary</code></li>
<li
><code>table</code>, <code>thead</code>, <code>tbody</code>, <code>tr</code>,
<code>th</code>, <code>td</code></li
>
</ul>
<p>These tags may have the following attributes:</p>
<ul>
<li><code>id</code></li>
<li><code>class</code></li>
<li><code>href</code></li>
<li><code>title</code></li>
<li><code>src</code></li>
<li><code>height</code></li>
<li><code>width</code></li>
<li><code>alt</code></li>
<li><code>dir</code></li>
<li><code>lang</code></li>
<li><code>start</code></li>
<li><code>rowspan</code></li>
<li><code>colspan</code></li>
</ul>
<p>Shorter text forms, such as comments, support the following HTML tags:</p>
<ul>
<li><code>a</code></li>
<li><code>b</code></li>
<li><code>i</code></li>
<li><code>em</code></li>
<li><code>strong</code></li>
<li><code>strike</code></li>
<li><code>del</code></li>
<li><code>code</code></li>
</ul>
<p>These tags may have the following attributes:</p>
<ul>
<li><code>href</code></li>
<li><code>title</code></li>
</ul>
<hr />
<p
>HTML tags that do not appear on this list will be stripped out and not displayed if they are
included in posts or comments. The source code for supported tags in posts can be found in
<a href="https://github.com/codidact/qpixel/blob/develop/app/helpers/posts_helper.rb#L46"
><code>posts_helper.rb</code></a
>, and for comments in
<a href="https://github.com/codidact/qpixel/blob/develop/app/helpers/comments_helper.rb#L81"
><code>comments_helper.rb</code></a
>.</p
>
<hr />
<p
><sub
>Much of the content of this page came from
<a href="https://meta.codidact.com/posts/277420/277424#answer-277424"
>this answer by luap42</a
>.</sub
></p
>
Loading