Download the PHP package sqkhor/editorjs-html without Composer

On this page you can find all versions of the php package sqkhor/editorjs-html. 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 editorjs-html

editorjs-html (PHP Port)

This is a PHP port of editorjs-html by @pavittarx.

editorjs-html is a utility to parse Editor.js clean data (JSON) to HTML.

[Note] You don't actually need to convert Editor.js data to HTML for display. For that purpose, simply embed Editor.js in read-only mode.

[Note] This library is mainly for those who needs to convert Editor.js clean data to HTML for other uses, such as for API calls to other systems, or for migration to another editor.

Installation

Composer

Usage

Updates

See Releases

Docs

Supported Block Types

Accepted Data Format

The data passed to parse() or parse_strict() could be either an undecoded JSON string, or any JSON-decoded format (supports both stdClass and associative array)

Parse Entire Editor.js Data

Parse Entire Editor.js Data (Strict Mode)

Parse Single Clean Data Block

Get a list of missing parser functions

Extend For Custom Blocks

To add your own parser functions for unsupported block types, simply extend the edjsHTML class with the block parsers as static methods.

You can even override existing block parsers.

[Note] The name of the methods must match with Editor.js custom block type.

Example:

Design Notes

[Note] This section is not important.

Unlike Javascript/Typescript, which the original library is built on, you can't pass a function as a variable in PHP. This limits the ways we could pass a parser function to the main class.

Therefore I was left with 2 options:

  1. Have separate classes for the main operation and the block parsers. To add your own block parser, extend the parser class and pass it to the main class.
  2. Have block parsers all over the places, then register each of them to the main class.
  3. Have a single class for everything. To add your own block, simply extend the one-and-only class.

1 and #2 are the proper ways.

3 is easier to use.

I opted for #3.

License

MIT Public License

Author

@shuqikhor based on works by @pavittarx


All versions of editorjs-html with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-gd Version *
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 sqkhor/editorjs-html contains the following files

Loading the files please wait ....