承接 muhammadsiyab/editorjs-parser-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

muhammadsiyab/editorjs-parser-php

Composer 安装命令:

composer require muhammadsiyab/editorjs-parser-php

包简介

PHP parser for editorjs library

README 文档

README

This package allows you to easily parse Editor.js JSON output to HTML using PHP. This package is currently able to parse the blocks from these plugins:

Requirements

PHP >=7.4

Installation

composer require muhammadsiyab/editorjs-parser-php

Using

require "vendor/autoload.php";


use MuhammadSiyab\EditorjsParserPhp\Parser;


# The json output generated by Editor.js
$content = '{"time": 1711232666978,"blocks": [{...}]}' ;

$parser = new Parser();
$parsed = $parser->parse($content);

echo $parsed; // outputs the generated HTML

Allow only specific blocks for parsing

# Only parses the `headings` and `paragraphs`

$parsed = $parser
            ->only('header', 'paragraph') // can be parsed using the array syntax ['header', 'paragraph']
            ->parse($content);

Disable specific blocks from being parsed

# Parses all the blocks except `list` and `code`

$parsed = $parser
            ->except('list', 'code') // can be parsed using the array syntax ['list', 'code']
            ->parse($content);

License

This Package is open-sourced software licensed under the MIT license

统计信息

  • 总下载量: 667
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固