Download the PHP package nadar/prosemirror-json-parser without Composer

On this page you can find all versions of the php package nadar/prosemirror-json-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package prosemirror-json-parser

ProseMirror JSON Parser

The ProseMirror JSON Parser (prosemirror-json-parser) is a versatile PHP library crafted for effortless conversion of ProseMirror/TipTap JSON Model content into HTML. With dependency-free operation and exceptional parsing speed, this library ensures high-performance HTML generation. Seamlessly integrating with TipTap and ProseMirror, it offers customization through easy addition or modification of nodes. Effortlessly install via Composer, utilize the toHtml function and explore extensive customization options for tailored JSON to HTML conversion.

It functions seamlessly with both TipTap and ProseMirror because TipTap is built upon ProseMirror.

PHPUnit Tests Maintainability Test Coverage Latest Stable Version Total Downloads License

Key Features:

Installation & Usage

To install the library using Composer, execute the following command:

After installing the library, integrate the parser into your project. Utilize the toHtml function to convert your JSON value into renderable HTML code. Note that the toHtml function solely accepts an array. Therefore, if your content is in JSON format, employ json_decode($json, true) to initially convert the JSON string into an array and pass it toHtml(json_decode($json, true)).

Extending & Customizing

Each node corresponds to a callable function within the parser, using the node's name as the key. This setup allows for easy addition or modification of nodes.

For example, to adjust the rendering of the image node, you can include your own function into the parser using the replaceNode() method:

To see all default nodes declared, refer to the Types class.

If you have a custom node with a specific name, you can add it to the parser using the addNode() method:

The addNode() and replaceNode() methods are almost identical internally, except that replaceNode should only be used when altering the output of default nodes. You can view all by-default declared nodes in the Types class.


The text and image were enhanced by an AI, as English is not my first language and I am quite lazy. Even this sentence was generated by AI.


All versions of prosemirror-json-parser with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nadar/prosemirror-json-parser contains the following files

Loading the files please wait ....