decaporg / decaporg/decap-cms

Inline mode for markdown widget

Open
#3,369 0 comments 3 reactions 0 assignees View on GitHub
area: extensions/widgets/markdown kind: feature pinned
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**Is your feature request related to a problem? Please describe.**

If a field should allow markdown, but not block level content (headers, quotes, etc), there isn't a great way to facilitate that without locking down the widget. Primary use cases:

- fields like an author bio that should only include inline markdown characters
- editor components, Eg., definition lists support inline markdown

**Describe the solution you'd like**

Some sort of inline mode:
- toggle on via config
- toggle for preview output to not be wrapped in a paragraph (definition list previews require this)
- parser should ignore block level markdown tokens and treat them as literal characters
- UI
- editor components dropdown forced hidden
- block level buttons forced hidden
- inline buttons still subject to optional `buttons` config

**Describe alternatives you've considered**

Removing UI functionality for adding blocks, including hiding/disabling the rich text/markdown toggle. Downside to this is that blocks can still be read in, and will still be parsed as blocks.

**Additional context**

https://github.com/netlify/netlify-cms/pull/3300

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.