Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Rich Text Laravel Package

contentful/rich-text

PHP library for parsing and rendering Contentful Rich Text fields. Parses localized rich text JSON into node objects, resolves linked assets/entries via a link resolver, and renders nodes to output with a simple Renderer API. Requires PHP 7.2+ / 8.0+.

View on GitHub
Deep Wiki
Context7
4.0.3
  • Added support for strikethrough mark
4.0.2
  • Fixed a bug where localization was lost on Embedded{Asset,Entry}Block
  • Updated for PHP8.3
4.0.0

Changed

  • Breaking change: Added locale support to the richtext parser. This avoids bugs when parsing embedded fields using a different locale (see #65). This change changes the ParserInterface and NodeMapperInterface - any implementation using a custom parser or NodeMapper will need to update the entries accordingly. Additionally, the ParserInterface::parse() and ParserInterface::parseCollection() methods have been deprecated in favor of their localized version (ParserInterface::parseLocalized() and ParserInterface::parseCollectionLocalized(), respectively).
  • Breaking change: Dropped support for PHP7.
  • Added the embedded asset to the serialized version of EmbeddedAssetBlock and EmbeddedAssetInline (see #61).
  • Added support for superscript and subscript.

Internal

  • Overall CI cleanup
  • Added CI tests for PHP8.2

No meaningful changes since last release.

3.4.0

Added

  • Added support for table-header-cell

Internal

  • Updated header comments
  • Added CI tests for PHP8.1
3.3.0

Added

  • Added support for rich-text tables
3.2.0

Added

  • Added support for PHP8

Internal

  • Small CI updates
  • Edited source for PHP sami
3.1.2

Changed

  • DRY applied for Node/Heading classes by introducing new AbstractClass
  • performance improvements in create-redirector script
3.1.1

Changed

  • Node renderers now forward context
3.1.0

Changed

Drop MapperException and let the code simply throw the exception in the same form it was raised.

3.0.0

Changed

Added support for PHP 7.4. Removed support for PHP 7.0 & 7.1. Updated dependencies.

2.0.0

Changed

  • Nested references are not fetched recursively upfront, they are now resolved dynamically when used
  • Changed parameters/signatures for EmbeddedEntryBlock, EmbeddedEntryInline, EntryHyperlink,
  • Added EntryReferenceInterface and implementation
  • MapperException not thrown anymore
1.2.1
  • Fixed documentation
  • Escape html in text values
1.2.0

Added

  • The library now supports embedded-entry-inline and embedded-asset-inline nodes.
1.1.1

Fixed

  • Configuration constraint for contentful-core.php required strictly version 2.0.0, now it was fixed to allow for all v2 versions.
1.1.0

Added

  • Method Parser::setNodeMapper(string $nodeType, NodeMapperInterface $nodeMapper) was added, now it's possible to define custom mappers after the parser's creation.
1.0.0

Added

  • Node Nothing has been implemented, which is used as a replacement for when creating other nodes does not succeed (e.g. a link can't be resolved).
  • Node EmbeddedAssetBlock has been implemented.
1.0.0-beta5

Changed

  • Node AssetHyperlink now expects an object implementing AssetInterface instead of ResourceInterface. [BREAKING]
  • Nodes EmbeddedEntryBlock and EntryHyperlink now expects an object implementing EntryInterface instead of ResourceInterface. [BREAKING]

Removed

  • Method getNodeClass was removed from NodeInterface. [BREAKING]
1.0.0-beta4

Changed

  • Node Quote was renamed Blockquote. [BREAKING]
1.0.0-beta3

Changed

  • The package was renamed from contentful/structured-text-renderer to contentful/rich-text. [BREAKING]
1.0.0-beta2

Added

  • Node renderer Contentful\StructuredText\NodeRenderer\CatchAll can be used to avoid having the main renderer throw an exception in the event of an unsupported node. Use it like this:
    $renderer = new Contentful\StructuredText\Renderer();
    $renderer->appendNodeRenderer(new Contentful\StructuredText\NodeRenderer\CatchAll());
    
    It's important to use the appendNodeRenderer method to make the main renderer use it as last resort, otherwise, it will intercept all calls to other nodes.
  • NodeInterface now includes method getNodeClass, for exposing whether a node is of type block or inline.
1.0.0-beta1

Added

  • Initial implementation.
4.0.1

Added

  • Support for Contentful/Core v4.0.0
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky