承接 tbmatuka/editorjs-bundle 相关项目开发

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

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

tbmatuka/editorjs-bundle

最新稳定版本:v0.1.5

Composer 安装命令:

composer require tbmatuka/editorjs-bundle

包简介

Symfony bundle for Editor.js

README 文档

README

Symfony bundle that integrates Editor.js primarily with Symfony Forms.

Installation

Symfony

  1. Download the package with composer: $ composer require tbmatuka/editorjs-bundle
  2. Add the bundle to bundles.php if it wasn't added automatically: Tbmatuka\EditorjsBundle\TbmatukaEditorjsBundle::class => ['all' => true],
  3. Copy the example package config file (examples/ediotrjs.yaml) or use it as an example to create your own configuration.
  4. Add the form theme to your twig configuration:
twig:
  form_themes:
    - '@TbmatukaEditorjs/Form/editorjs_widget.html.twig'

JavaScript

There is an example of the JS implementation in examples/editorjs-init.js.

Encore/webpack

If you're using Encore, you will need to install the npm package for Editor.js (@editorjs/editorjs) and any plugins that you want to use. Copy the example to your assets dir, add the plugin classes to the array and import the file from your main JS file.

Inline

Configuration options and examples will have to be added for other loading methods (like loading JS from the CDN or a local path inline in the widget), but they're not there for now.

Usage

Symfony Forms

You can use the EditorjsType in your forms to get Editor.js on the frontend. Data (decoded json) is returned as an array.

Twig

You can get an Editor.js config directly from the Twig extension. Check the form widget in src/Resources/views/Form/editorjs_widget.html.twig to see how to use it. The editorjs() Twig function accepts either a configuration object or just the name of a configuration that you want to use.

Contributing

Any kind of help is welcome, but especially information about the included JS not working in specific browsers. Please open an issue to discuss whatever you want to work on before you submit a pull request and avoid any kind of BC breaking changes unless they are agreed to in the issue discussion.

统计信息

  • 总下载量: 16.69k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 19
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 19
  • Watchers: 1
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-04-15