PHPackages                             prozhou/math-editor-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. prozhou/math-editor-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

prozhou/math-editor-bundle
==========================

ueditor and matheditor for Symfony 2/3.

v1.0.0(8y ago)016MITJavaScriptPHP ^5.3.3|^7.0

Since Dec 20Pushed 8y ago1 watchersCompare

[ Source](https://github.com/zhouzheng12/ProzhouMathEditorBundle)[ Packagist](https://packagist.org/packages/prozhou/math-editor-bundle)[ RSS](/packages/prozhou-math-editor-bundle/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (6)Versions (2)Used By (0)

ProzhouMathEditorBundle
=======================

[](#prozhoumatheditorbundle)

在jims/editor-hub-bundle基础上添加公式编辑器功能，支持多个实例

安装
--

[](#安装)

1.Step 1 composer 安装

```
composer require jims/editor-hub-bundle
composer require prozhou/math-editor-bundle

```

```
2.Step 2 添加到appKernel.php  同时 更新资源
```php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Jims\EditorHubBundle\JimsEditorHubBundle(),
        new Prozhou\MathEditorBundle\ProzhouMathEditorBundle(),
    );
}

//then update assets 更新资源:

app/console assets:install web --symlink   #sf2
bin/console assets:install web --symlink   #sf3

```

3.Step 3 Import routes to app/config/routing.yml

```
// app/config/routing.yml
jims_editor:
  resource: "@JimsEditorHubBundle/Resources/config/routing.yml"
  prefix:   /
```

4.Step 4 Import form themes to app/config/config.yml

```
//app/config/config.yml
twig:
  ...
  form_themes:
      - 'JimsEditorHubBundle:Form:form_ueditor_type.html.twig'
      - 'JimsEditorHubBundle:Form:form_umeditor_type.html.twig'
```

5.Step 5 添加设置bundle 配置 于 app/config/config.yml

```
//app/config/config.yml
jims_editor_hub:
  ueditor:
      config_file: ~       #ueditor 的 配置文件的 默认文件： "bundle路径"+Resources/config/config.json
  umeditor:
      save_path:    "upload/umeditor/"                                  #存储文件夹
      max_size:     2000                                                #允许的文件最大尺寸，单位KB
      allow_files:  [ ".gif" , ".png" , ".jpg" , ".jpeg" , ".bmp" ]     #允许的文件格式
```

使用方法
----

[](#使用方法)

```
