rich-text-to-jsx

📄 Opinionated JSX renderer for the Contentful rich text field type.

MIT License

Downloads
14.2K
Stars
49
Committers
6

Bot releases are hidden (Show)

rich-text-to-jsx - 2.1.3

Published by connor-baer about 5 years ago

2.1.3 (2019-09-06)

Dependencies

  • Upgrade dev dependencies (7fcb4b7)

Tech

rich-text-to-jsx - 2.1.2

Published by connor-baer about 5 years ago

Docs

  • Add note about content structure @connor-baer

Dependencies

  • #11 Bump eslint-utils from 1.3.1 to 1.4.2
  • #10 Bump lodash from 4.17.11 to 4.17.14
  • #9 Bump handlebars from 4.0.12 to 4.1.2
  • #8 Bump js-yaml from 3.12.0 to 3.13.1
  • #7 Bump webpack-bundle-analyzer from 3.0.3 to 3.3.2
rich-text-to-jsx - 2.1.1

Published by connor-baer over 5 years ago

Bug fixes

  • #4 Get content type from resolved linked entry @kevee
  • #6 Use correct content structure for tests and default components @connor-baer

Docs

  • #5 Add contributing docs @connor-baer
rich-text-to-jsx - 2.1.0

Published by connor-baer over 5 years ago

Changes

  • Add default components for embedded assets: by default, images, videos, and audio files are rendered with the appropriate HTML5 elements when embedded as blocks and as download links when embedded inline or as hyperlinks.
rich-text-to-jsx - 2.0.0

Published by connor-baer over 5 years ago

Changes

  • Improve support for custom elements: custom components for embedded entries and assets can now be defined more easily. Have a look at the documentation to see how. (#1)

[BREAKING CHANGE] Overrides for custom elements are now indexed the other way round: nodeType -> contentType/mimeTypeGroup instead of contentType -> nodeType

Enhancements

  • Use helpers from Contentful (f9539db)
rich-text-to-jsx - 1.0.0

Published by connor-baer over 5 years ago

Initial release 🚀

  • Any HTML tags (corresponding to node types) rendered by the compiler can be overridden to include additional props or even a different React component entirely.
  • Embedded entries and assets can be rendered using different components depending on whether they are inline, blocks or hyperlinks.
  • The rendering function can be customized.
Package Rankings
Top 4.72% on Npmjs.org
Badges
Extracted from project README's
NPM version Continuous Integration Code coverage License MIT Contributor Covenant