The Discourse Mark Plugin, created by sirideain, adds an editor option to highlight text using the == syntax or the <mark> tag. The plugin is available on GitHub and can be installed following the instructions on meta.discourse.org.
Codinghorror noted that a similar effect can be achieved using HTML tags <ins> and <del>, but Stephen pointed out that highlighting, insertions, and deletions serve different purposes.
Justin suggested that the plugin follow other common Markdown highlight syntax, such as using double colons :: to enclose text. Sirideain replied that this would require adding support to the markdown-it-mark plugin.
Some users experienced issues with the plugin, including peternlewis, who found that the Highlight Text option did not appear in the gear menu, and StonkGodCapital, who reported that the plugin broke the preview window on the latest version of Discourse.
Sirideain announced that they are no longer actively maintaining the plugin and invited pull requests. JammyDodger noted that the <mark> tag is now supported in core, allowing users to manually add highlighted text without the plugin.
Yes totally fine, just pointing out there’s an alternative “sort-of” way to do this built in. I don’t think Commonmark even specifies highlight as part of the standard…
That’s a very literal reading. If I was to tell you I just highlighted this text how would anyone reading even know any different? Particularly if I changed the CSS to whatever color and style I liked..
Highlighting indicates areas for attention, insertions and deletions indicate change.
Sure, we can use CSS to restyle elements, we could also for example set background-color on anything within <strong> tags, but then we would lose the ability to make things bold without also highlighting them. The plugin lets us highlight passages without losing differentiation between the styles associated with tracked changes. Being a totally optional plugin which expands upon a well-established convention I don’t see tremendous value in confusing the two.
It would be great if this followed other common Markdown highlight syntax. I’m not sure if it’s in a particular spec (a quick Google search didn’t yield anything), but popular Markdown apps with the highlight feature use double colons to enclose text, like so:
Discourse is using markdown-it for parsing markdown. I am bundling the markdown-it-mark plugin so it is available in Discourse. Support for this syntax would need to be added there.
I just tested with a fresh install of 2.7 beta1 and it seems to be working correctly. What other plugins do you have installed? Is there anything in the Discourse logs?
I tried adding in the other plugins you listed and I was not able reproduce the issue.
I am not surprised the logs listed markdown as that is used for all formatting in Discourse posts. I didn’t see any mention of this plugin in the logs you posted.
What happens if you add the plugin back in and rebuild again? I think your idea that it was the rebuild is accurate.
I reinstalled the mark plugin and everything seems fine, so some combination of removing the plugin and rebuilding resolved the inability to post, and reinstalling the plugin and rebuilding did not return to the failure state.
Who knows what that means, but I’m happy to have the plugin back.
Is there a way to add styling shortcuts to the Post editor’s toolbar? There are a number of tags that would improve the comprehension of technical topics. But newbies, on the other hand, are frustrated by the austerity of the Discourse toolbar.
Perhaps we could have toolbar options for a few Markdown tags we can use to make our posts more readable. Your example of Insert & Delete are very practical. This plus the keyboard button tag already clarify our postings by experienced regulars.
And since we are doing community-powered software support, a customizable emoji group (floated to the top/default) would be helpful. (We’d add a technology emoji group.)