Discourse Mark Plugin

discourse-mark

Repository: GitHub - sirideain/discourse-mark: Adds highlighting to Discourse · GitHub

Funktionen

  • Fügt eine Editor-Option zum Hervorheben von Text hinzu.

Verwendung

Du kannst Text mit == umschließen, um ihn hervorzuheben.

==Hervorgehobener Text==

Installation

Bekannte Probleme

  • Keine

Zukunft

  • Aktualisiere das Symbol zu einem Textmarker, sobald Font Awesome 5 verfügbar ist
27 „Gefällt mir“

This is already sort of possible in default Discourse with HTML tags

inserted text and deleted text

<ins>inserted text</ins> and <del>deleted text</del>

Not quite the same as “highlighted” but a very similar effect at least for <ins>

10 „Gefällt mir“

I think @sirideain put this together following this thread: Discourse CommonMark text highlighting?

2 „Gefällt mir“

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…

1 „Gefällt mir“

I think they’re fundamentally different things though? Insertions and deletions may be used in parallel with highlighting.

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…

2 „Gefällt mir“

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.

1 „Gefällt mir“

It is not part of the commonmark spec, that is for sure.

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:

::Highlighted Text::

Love the idea though!

2 „Gefällt mir“

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.

5 „Gefällt mir“

I installed this, and the ==text== highlighting works, but the Highlight Text option does not show up in the gear menu.

Curiously the Green Tick does not show next to the plugin either:

but I don’t know if that is related.

The green tick will only appear next to official plugins that are supported by the core discourse team, to distinguish them from 3rd party plugins.

6 „Gefällt mir“

There was an issue where the highlighting was not respecting the enable setting, but the gear menu option was. This has been fixed now.

This plugin appears to break posting in Discourse 2.6. At least, posting failed with error 500 until I removed this plugin and rebuilt my forum.

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?

See:

It is possible the rebuild was all that was required, though the error logs do mention markdown.

The other plugins are all Discourse first party ones.

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 will try that and get back to you. I might not be able to get it done today, I need to do it when I have some time to track it carefully.

Thanks for the feedback.

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.

Thanks.

Gibt es eine Möglichkeit, Styling-Shortcuts zur Symbolleiste des Beitragseditors hinzuzufügen? Es gibt eine Reihe von Tags, die das Verständnis technischer Themen verbessern würden. Neue Nutzer hingegen sind jedoch frustriert von der Sparsamkeit der Discourse-Symbolleiste.

Vielleicht könnten wir Symbolleistenoptionen für ein paar Markdown-Tags anbieten, die wir nutzen können, um unsere Beiträge lesbarer zu machen. Ihr Beispiel von Einfügen und Löschen ist sehr praktisch. Zusammen mit dem Tastatur-Taste-Tag klären dies bereits erfahrene Stammnutzer bei ihren Beiträgen.

Und da wir softwaretechnischen Support durch die Community leisten, wäre eine anpassbare Emoji-Gruppe (die oben/default angezeigt wird) hilfreich. (Wir würden eine Technologie-Emoji-Gruppe hinzufügen.)

eingefügter Code: <ins>eingefügter Code</ins>
gelöschter Code: <del>gelöschter Code</del>
markierter Text: <mark>markierter Text</mark>
Tastaturtasten Strg+k: <kbd>Strg</kbd>+<kbd>k</kbd>

Zu den Technologie-Emojis gehören Eingabegeräte wie Maus und Tastatur.
:computer_mouse: Computermäuse

4 „Gefällt mir“