dosamigos\ckeditor\CKEditor::init PHP Method

init() public method

public init ( )
    public function init()
    {
        parent::init();
        $this->initOptions();
    }

Usage Example

Beispiel #1
0
 public function init()
 {
     $theme = new AppAsset();
     $baseUrl = \Yii::getAlias($theme->baseUrl);
     $cssList = [];
     foreach ($theme->css as $css) {
         if (preg_match('#^http#', $css)) {
             continue;
         }
         $cssList[] = $baseUrl . '/' . $css;
     }
     $this->clientOptions = ['toolbar' => 'full', 'contentsCss' => $cssList, 'allowedContent' => true, 'disallowedContent' => 'img{width,height,style}', 'extraAllowedContent' => 'div(*){*}[*],span(*){*}[*]', 'shiftEnterMode' => 2, 'image2_disableResizer' => true, 'image2_prefillDimensions' => false];
     if ($this->userOptions) {
         foreach ($this->userOptions as $k => $v) {
             $this->clientOptions[$k] = $v;
         }
     }
     parent::init();
 }
All Usage Examples Of dosamigos\ckeditor\CKEditor::init