mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 18:10:06 -05:00
Corrected against the code: sixteen languages are right-to-left, not six; the drag-handle choice is saved in the user profile, and in localStorage only when nobody is logged in; Red Strings are shown from Member Settings, not the board header; Markdown task lists render as checkboxes; the emoji list link points at the plugin's current data file. Mermaid stays documented as removed. Thanks to xet7 !
3.2 KiB
3.2 KiB
Markdown editor
What it is
WeKan uses a plain-text textarea to edit Markdown in card descriptions and comments, with mention suggestions and rendered previews. It does not use a WYSIWYG editor: no existing editor supports the complete combination of WeKan's Markdown, emoji, security requirements and other editing features.
Read more
- Markdown and WYSIWYG on Wikipedia.
- markdown-it, the renderer, DOMPurify, the sanitizer, and html-to-markdown, which turns pasted HTML into Markdown.
- WeKan pages: Markdown, Emoji, LaTeX, Numbered text, RTL.
How to use it
- Open a card and click its description, or the comment field.
- Write Markdown. Type
@and the start of a name to get member suggestions; pick one with the mouse or Enter. - Save. The text is shown rendered.
Editing and rendering are separate. Markdown rendering, emoji, mentions, HTML-to-Markdown conversion and attachment links remain available. Uploaded files stay in the card's Attachments section and can be referenced from text. There is no environment variable or Snap option to enable a visual editor.
How the numbers are calculated
The editor has no numbers of its own. A mention suggestion starts after @
followed by letters, digits, . or - (/\B@([\w.-]*)$/).
How it works in WeKan
- The
editor,viewerandinlineViewertemplates are client/components/main/editor.jade and editor.js; the description and comment forms include+editor. - Rendering is the
markdownpackage, packages/markdown/src/template-integration.js (markdown-it withhtml,linkifyandbreakson, emoji, math, task lists), and its output is cleaned by packages/markdown/src/secureDOMPurify.js. - Notification email formatting is independent of the text editor. Default notification bodies use the shared HTML-escaping formatter; administrator-defined email body templates retain their existing behavior.
Commits
- Version Control, the activity feed and the email list render titles as Markdown
- Copying a code block no longer opens a new tab
- Link custom URL schemes only when an administrator lists them
- Remove the obsolete Summernote integration
- Visible, selectable comment mention suggestions
- A pasted link to another WeKan card shows that card's title