Discourse Mark Plugin

discourse-mark

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

Features

  • Adds an editor option to highlight text.

Usage

You can wrap text with == to highlight it.

==Highlighted Text==

Installation

Known Issues

  • None

Future

  • Update icon to highlighter once Font Awesome 5 is available
27개의 좋아요

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개의 좋아요

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

2개의 좋아요

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개의 좋아요

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개의 좋아요

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개의 좋아요

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개의 좋아요

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개의 좋아요

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개의 좋아요

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

이 플러그인은 Discourse 2.6에서 게시 기능을 깨뜨리는 것 같습니다. 적어도 이 플러그인을 제거하고 포럼을 다시 빌드하기 전까지는 오류 500으로 게시가 실패했습니다.

방금 2.7 beta1의 새로운 설치 환경에서 테스트해 보았는데 정상적으로 작동하는 것 같습니다. 어떤 다른 플러그인이 설치되어 있나요? Discourse 로그에 관련 내용이 있나요?

참고:

오류 로그에 마크다운이 언급되어 있지만, 재구축(rebuild)만으로도 해결되었을 가능성이 있습니다.

다른 플러그인들은 모두 Discourse 공식(1st party) 플러그인입니다.

게시해 주신 다른 플러그인들을 추가해 보았지만 문제를 재현할 수 없었습니다.

로그에 마크다운이 표시된 것은 놀랍지 않습니다. Discourse 게시물에서 모든 포맷팅에 마크다운이 사용되니까요. 올려주신 로그에는 해당 플러그인에 대한 언급이 보이지 않았습니다.

해당 플러그인을 다시 추가하고 다시 빌드(rebuild)하면 어떻게 될까요? 빌드 과정이 문제였다는 여러분의 추측이 정확하다고 생각합니다.

그렇게 시도해 보고 다시 알려드리겠습니다. 오늘까지는 못할 수도 있습니다. 주의 깊게 추적해 볼 시간이 필요하기 때문입니다.

피드백 감사합니다.

mark 플러그인을 다시 설치했는데 지금은 모두 정상인 것 같습니다. 플러그인을 제거하고 재빌드하는 조합이 게시 불가 문제를 해결했고, 플러그인을 다시 설치하고 재빌드했을 때 실패 상태로 돌아가지 않았습니다.

그것이 정확히 무엇을 의미하는지는 모르겠지만, 플러그인이 다시 돌아와서 다행입니다.

감사합니다.

게시물 편집기 툴바에 스타일 단축키를 추가하는 방법이 있을까요? 기술적인 주제의 이해도를 높여줄 수 있는 태그들이 몇 가지 있습니다. 하지만 다른 한편으로, 초보자들은 Discourse 툴바의 단순함 때문에 불편함을 호소하기도 합니다.

아마도 게시물을 더 가독성 있게 만들 수 있는 몇 가지 마크다운 태그에 대한 툴바 옵션을 제공할 수 있을 것입니다. 삽입 및 삭제에 대한 당신의 예시는 매우 실용적입니다. 이 태그들과 키보드 버튼 태그는 이미 숙련된 단골 사용자들의 게시물을 명확하게 해줍니다.

그리고 우리는 커뮤니티 기반 소프트웨어 지원을 수행하고 있으므로, 사용자 정의 이모지 그룹(상단/기본값으로 플로팅)이 도움이 될 것입니다. (우리는 기술 이모지 그룹을 추가할 것입니다.)

삽입된 코드 : <ins>inserted code</ins>
삭제된 코드 : <del>deleted code</del>
표시된 텍스트 : <mark>marked text</mark>
키보드 키 Ctrl+k : <kbd>Ctrl</kbd>+<kbd>k</kbd>

기술 이모지에는 마우스 및 키보드와 같은 입력 장치가 포함됩니다.
:computer_mouse: 컴퓨터 마우스

4개의 좋아요