mashmars/froalaeditor

一个froalaeditor2.8.1破解版的bundle

安装: 8

依赖项: 0

建议者: 0

安全性: 0

星标: 2

关注者: 2

分支: 0

开放问题: 0

语言:JavaScript

类型:symfony-bundle

v1.2 2019-06-17 06:53 UTC

This package is auto-updated.

Last update: 2024-09-17 18:16:47 UTC


README

floalaeditor2.8.1破解bundle

composer require mashmars/froalaeditor

symfony4 配置如下

# config/bundles.php
Mashmars\FroalaeditorBundle\FroalaeditorBundle::class => ['all' => true],
# 添加静态文件
php bin/console assets:install

新增配置froalaeditor.yaml

# config/packages/froalaeditor.yaml

froalaeditor: 
  upload_directory:
    image_directory: ./upload/images  # 图片上传目录 以及 图片检索目录
    video_directory: ./upload/videos  # 视频上传目录
    file_directory: ./upload/files    # 文件上传目录

修改twig.yaml配置

# config/packages/twig.yaml 新增字段模板
form_themes:
    - '@Froalaeditor/Form/froalaeditor_type.twig'

引入FroalaeditorBundle路由

# config/routes.yaml 新增
froalaeditor:
  resource: '@FroalaeditorBundle/Resources/config/route.yaml'  
  prefix: /

使用formType

use Mashmars\FroalaeditorBundle\Form\FroalaeditorType;
$builder->add('content', FroalaeditorType::class)

####效果 效果图