2amigos / yii2-ckeditor-widget

CKEditor WYSIWYG widget for Yii2.
https://2amigos.us/open-source/ckeditor-widget
Other
172 stars 111 forks source link

Improve README.md with directory structure #107

Closed DBX12 closed 7 years ago

DBX12 commented 7 years ago

It would be very helpful to novice Yii2 developers if you could describe the directory structure for skins and plugins. You describe I have to configure ckeditor through the clientOptions array, yet I don't know where to put the skins folder downloaded from the offical ckeditor site. I'm using the basic app template of Yii2. Is this a correct setup?

+ web
+---assets
+---css
+---skins
    +---moono-dark
    +---office2013

my options array looks like this:

[
   'options' => [ 'rows' => 6 ],
   'clientOptions' => [
      'skin' => 'moono-dark'
   ],
   'preset' => 'basic' 
]

I already checked the permissions on all files and folders in the skins folder and set them to 777, the editor still does not appear. I found a "hacky" way of adding the skin, yet I think its the wrong way. I checked the browser console which said, it couldn't find css files from the skin in a folder below the assets folder. I navigated into said folder and inserted the skin folder manually. I'm aware, I shouldn't do this as these files are generated by Yii2. Please, enlighten me and maybe some more devs about doing it right :)

tonydspaniard commented 7 years ago

According to the documentation (http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-skin) what you need to do is to place the skin on a public accessible folder (ie /frontend/web/js/cke/skins/) and then use the following:

[
   'options' => [ 'rows' => 6 ],
   'clientOptions' => [
      'skin' => 'moono-dark,/js/cke/skins/monoo/'
   ],
   'preset' => 'basic' 
]

Let me know if it works