Plugin Discourse Mark

discourse-mark

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

Funzionalità

  • Aggiunge un’opzione nell’editor per evidenziare il testo.

Utilizzo

Puoi racchiudere il testo tra == per evidenziarlo.

==Testo Evidenziato==

Installazione

Problemi noti

  • Nessuno

Futuro

  • Aggiornare l’icona a quella di un evidenziatore non appena Font Awesome 5 sarà disponibile
27 Mi Piace

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 Mi Piace

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

2 Mi Piace

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 Mi Piace

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 Mi Piace

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 Mi Piace

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 Mi Piace

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 Mi Piace

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 Mi Piace

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

Questo plugin sembra causare problemi nella pubblicazione su Discourse 2.6. Almeno, la pubblicazione falliva con un errore 500 finché non ho rimosso questo plugin e ricostruito il mio forum.

Ho appena testato con un’installazione pulita della versione 2.7 beta1 e sembra funzionare correttamente. Quali altri plugin hai installato? C’è qualcosa nei log di Discourse?

Vedi:

È possibile che il rebuild sia stato tutto ciò che era necessario, anche se i log degli errori menzionano markdown.

Gli altri plugin sono tutti di prima parte di Discourse.

Ho provato ad aggiungere gli altri plugin che hai elencato, ma non sono riuscito a riprodurre il problema.

Non mi sorprende che nei log sia menzionato markdown, dato che viene utilizzato per tutta la formattazione nei post di Discourse. Non ho notato alcun riferimento a questo plugin nei log che hai pubblicato.

Cosa succede se aggiungi di nuovo il plugin e ricostruisci? Penso che la tua idea secondo cui il problema fosse la ricostruzione sia corretta.

Proverò e ti farò sapere. Potrebbe non riuscire a farlo oggi; devo farlo quando avrò un po’ di tempo per analizzarlo con attenzione.

Grazie per il feedback.

Ho reinstallato il plugin mark e sembra che tutto funzioni correttamente, quindi una certa combinazione di rimozione del plugin e ricostruzione ha risolto l’impossibilità di pubblicare, mentre la reinstallazione del plugin e la successiva ricostruzione non hanno fatto ripresentare il problema.

Chi può dire cosa significhi, ma sono felice di avere di nuovo il plugin.

Grazie.

Esiste un modo per aggiungere scorciatoie di stile alla barra degli strumenti dell’editor dei post? Ci sono diversi tag che migliorerebbero la comprensione degli argomenti tecnici. D’altro canto, i nuovi utenti sono frustrati dall’austerità della barra degli strumenti di Discourse.

Forse potremmo avere opzioni nella barra degli strumenti per alcuni tag Markdown che possiamo usare per rendere i nostri post più leggibili. Il tuo esempio di Inserisci e Cancella è molto pratico. Questo, insieme al tag tasto da tastiera, chiarisce già i nostri post redatti da utenti esperti regolari.

E poiché offriamo supporto software guidato dalla comunità, un gruppo di emoji personalizzabile (portato in alto/impostato come predefinito) sarebbe utile. (Aggiungeremmo un gruppo di emoji tecnologiche.)

codice inserito: <ins>codice inserito</ins>
codice cancellato: <del>codice cancellato</del>
testo evidenziato: <mark>testo evidenziato</mark>
Tasti da tastiera Ctrl+k: <kbd>Ctrl</kbd>+<kbd>k</kbd>

Le emoji tecnologiche includono dispositivi di input come il mouse e la tastiera.
:computer_mouse: Mouse del computer

4 Mi Piace