Plugin de marcas de discurso

discourse-mark

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

Características

  • Agrega una opción en el editor para resaltar texto.

Uso

Puedes envolver el texto con == para resaltarlo.

==Texto Resaltado==

Instalación

Problemas Conocidos

  • Ninguno

Futuro

  • Actualizar el ícono a un resaltador una vez que Font Awesome 5 esté disponible
27 Me gusta

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 Me gusta

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

2 Me gusta

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 me gusta

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 Me gusta

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 me gusta

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 Me gusta

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 Me gusta

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 Me gusta

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

Este complemento parece romper la publicación en Discourse 2.6. Al menos, la publicación falló con el error 500 hasta que eliminé este complemento y reconstruí mi foro.

Acabo de probar con una instalación limpia de la beta 1 de la versión 2.7 y parece que funciona correctamente. ¿Qué otros complementos tienes instalados? ¿Hay algo en los registros de Discourse?

Ver:

Es posible que la reconstrucción haya sido todo lo necesario, aunque los registros de error mencionan markdown.

Los otros plugins son todos de primera parte de Discourse.

Intenté agregar los otros plugins que mencionaste y no pude reproducir el problema.

No me sorprende que los registros mencionen markdown, ya que se utiliza para todo el formato en las publicaciones de Discourse. No vi ninguna mención de este plugin en los registros que compartiste.

¿Qué sucede si vuelves a agregar el plugin y lo reconstruyes nuevamente? Creo que tu idea de que fue el proceso de reconstrucción es acertada.

Lo probaré y te avisaré. Es posible que no pueda hacerlo hoy; necesito hacerlo cuando tenga tiempo para rastrearlo con cuidado.

Gracias por la retroalimentación.

Reinstalé el plugin mark y todo parece estar bien, así que alguna combinación de desinstalar el plugin y reconstruir resolvió la incapacidad de publicar, y reinstalar el plugin y volver a reconstruir no devolvió el estado de fallo.

Quién sabe qué significa eso, pero estoy feliz de tener el plugin de nuevo.

Gracias.

¿Existe alguna forma de agregar atajos de estilo a la barra de herramientas del editor de publicaciones? Hay varias etiquetas que mejorarían la comprensión de los temas técnicos. Sin embargo, por otro lado, los novatos se frustran por la austeridad de la barra de herramientas de Discourse.

Quizás podríamos incluir opciones en la barra de herramientas para algunas etiquetas Markdown que nos permitan hacer nuestras publicaciones más legibles. Tu ejemplo de Insertar y Eliminar es muy práctico. Esto, junto con la etiqueta tecla de teclado, ya aclaran nuestras publicaciones de los usuarios habituales experimentados.

Y dado que brindamos soporte de software impulsado por la comunidad, sería útil tener un grupo de emojis personalizable (flotado en la parte superior/por defecto). (Añadiríamos un grupo de emojis de tecnología.)

código insertado: <ins>código insertado</ins>
código eliminado: <del>código eliminado</del>
texto marcado: <mark>texto marcado</mark>
Teclas de teclado Ctrl+k: <kbd>Ctrl</kbd>+<kbd>k</kbd>

Los emojis de tecnología incluyen dispositivos de entrada como el mouse y el teclado.
:computer_mouse: Mouse de computadora

4 Me gusta