PHP code example of jims / editor-hub-bundle

1. Go to this page and download the library: Download jims/editor-hub-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jims / editor-hub-bundle example snippets


  // config/bundles.php

  Jims\EditorHubBundle\JimsEditorHubBundle::class => ['all' => true],
  
  //then update assets 更新资源:

  bin/console assets:install public --symlink   #sf3
  

    use Jims\EditorHubBundle\Form\UeditorType;
    use Jims\EditorHubBundle\Form\UmeditorType;
    ...
    ...
      #使用ueditor
      ->add('content', UeditorType::class, array(
            "attr" => array(
                "style" => "height:400px;width:600px;", //editor转换成编辑器编辑空间尺寸
                "class"=>"jims",
            ),
            //通过自定义js, 控制editor toolbars
            'js_script' => "window.UEDITOR_CONFIG.toolbars=[['fullscreen', 'source', 'undo', 'redo', 'bold']]",
        ))
        #使用umeditor
        //->add('content', UmeditorType::class, array(
        //    "attr" => array(
        //        "style" => "width:555px;",
        //        "class"=>"jims",
        //    ),
        //))