I’d like to be able to use <mark>
tags in posts to highlight bits of text, especially in quoted language.
Is this something I should potentially take to markdown-it directly?
I’d like to be able to use <mark>
tags in posts to highlight bits of text, especially in quoted language.
Is this something I should potentially take to markdown-it directly?
I think that Discourse could allow the <mark>
HTML tag to be used in posts through a fairly small change to the core Discourse code. Getting markdown to support mark
would be great too. I see a discussion on their forum about it here: A proposal to support the <mark> tag with Markdown - Extensions - CommonMark Discussion.
I went digging around the repo with git grep markdown-it
, but got too many results to pinpoint where to propose a patch.
I recall that Discourse already passes through <ins>
and <del>
.
Those strike me as vewyvery close to <mark>
.
Are you just wanting to be able to use the <mark>
HTML tag? If so, I think it just needs to get added to a list of allowed tags in the Discourse code. Someone from the dev team should know which file needs to get updated.
Yup, it’s app/assets/javascripts/pretty-text/addon/allow-lister.js
. We should probably also make sure to ship some reasonable default CSS.
Can you share a screenshot of what <mark>
would look like? We know what <ins>
and <del>
look like… ins and del.
Just trying to understand the goal.
background-color: yellow;
IIRC this is more or less as stands in many user-agent default styles.
I suppose that seems benign enough, and we have precedent in the form of <ins>
and <del>
… what do you think @sam @eviltrout?
Seems easy and fine @techAPJ can sort it next week
Done via:
This text is <mark>highlighted</mark>.
This text is highlighted.
This topic was automatically closed after 6 days. New replies are no longer allowed.