Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

Whitelist markdown features via config.features #43

Merged
merged 3 commits into from
Apr 6, 2018
Merged

Conversation

juliankrispel
Copy link

  • whitelist block features
  • whitelist inline features
  • update tests
  • update readme to document whitelisted features

fixes #21

Example:

// this will only enable BOLD for inline and CODE
// as well as header-one for blocks
const features = {
  inline: ['BOLD'],
  block: ['CODE', 'header-one'],
}
const plugin = createMarkdownPlugin({ features })

- whitelist inline features
- update tests
- update readme to document whitelisted features
Copy link

@mxstbr mxstbr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yesss, amazing! Two small nitpicks inline then let's ship this :shipit:

README.md Outdated
'header-six',
'ordered-list-item',
'unordered-list-item',
CHECKABLE_LIST_ITEM,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a string or a constant that needs to be imported?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point I'll add that to the readme

@@ -95,8 +95,7 @@
"peerDependencies": {
"draft-js-plugins-editor": "~2.0.0-rc.1 || 2.0.0-rc2 || 2.0.0-rc1 || 2.0.0-beta12",
"react": "^15.0.0",
"react-dom": "^15.0.0",
"react-portal": "^4.1.4"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this removed on purpose?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes! react-dom isn't actually removed

@juliankrispel
Copy link
Author

@mxstbr all addressed

Copy link

@mxstbr mxstbr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me, thank you so much! Can't wait to ship this for the message input 🔥

@mxstbr mxstbr merged commit 6322893 into master Apr 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to only allow certain markdown features
2 participants