react-markdown
Advanced tools
Changelog
2.4.1 - 2016-07-09
commonmark-react-renderer
, fixing a bug with missing nodes
(Espen Hovlandsdal)Changelog
2.4.0 - 2016-07-09
transformImageUri
option allows you to transform URIs for images
(Petri Lehtinen)Changelog
2.3.0 - 2016-06-06
walker
instance is now passed to the walker
callback function
(Riku Rouvila)Changelog
2.1.0 - 2016-03-12
Changelog
2.0.1 - 2016-02-21
commonmark-react-renderer
dependency to latest version to add keys
to all elements and simplify custom renderersChangelog
2.0.0 - 2016-02-21
allowNode
now receives different properties in the
options argument.
See README.md
for more details.Html
is now HtmlInline
, Header
is now Heading
and HorizontalRule
is now ThematicBreak
.
This affects the allowedTypes
and disallowedTypes
options.allowedTypes
/disallowedTypes
and
allowNode
options made them only applicable to certain types.
In this version, all types are filtered, as expected.javascript:
with x-
(eg: javascript:alert('foo')
turns into x-javascript:alert('foo')
).
This can be overridden with the transformLinkUri
-option.
Pass null
to disable the feature or a custom function to replace the
built-in behaviour.renderers
option allows you to customize which React component should
be used for rendering given types.
See README.md
for more details.
(Espen Hovlandsdal / Guillaume Plique)unwrapDisallowed
option allows you to select if the contents of a
disallowed node should be “unwrapped” (placed into the disallowed node
position).
For instance, setting this option to true and disallowing a link would still
render the text of the link, instead of the whole link node and all it’s
children disappearing.
(Espen Hovlandsdal)transformLinkUri
option allows you to transform URIs in links.
By default, an XSS-filter is used, but you could also use this for use cases
like transforming absolute to relative URLs, or similar.
(Espen Hovlandsdal)