2016-10-12 1 views
0

私はCKEDITORに問題があります。私はバワーでそれをインストールし、ベースパスを変更しました。だからCKEDITORは働いている。 私の問題は、カスタムスキンを試してみることです。ckeditor setカスタムスキンパス

これはコードです:

<textarea id="editor-<?= $block_count ?>" name="block[<?= $block_count ?>][text][]" rows="10" cols="80" class="form-control"></textarea> 
    <script> 
     CKEDITOR.replace('editor-<?= $block_count ?>',{ 
     customConfig: '../../dist/scripts/ckeditor.js', 
     skin: 'office2013' 
     }); 
    </script> 

しかし、それは肌をLAODしたい場合、私は、このエラーメッセージが出ます:

ckeditor.js:76 GET  
htttp://myurl.com/src/bower_components/ckeditor/skins/office2013/editor.css?t=G87D 

を私のようなtehの亭パスからそれをロードするskinpathを定義することができます:

CKEDITOR.replace('editor-<?= $block_count ?>',{ 
    customConfig: '../../dist/scripts/ckeditor.js', 
    skinpath: 'src/bower_componnts/ckeditor-office2013-skin/office2013/', 
    skin: 'office2013' 
    }); 

答えて

0

はいできます。 Check the documentation

エディタのインストール時にデフォルトのスキンフォルダの外にスキンをインストールすることは可能です。その場合、そのフォルダへの絶対URLパスをカンマ( 'skin_name、skin_path')で区切って指定する必要があります。

config.skin = 'moono'; 

config.skin = 'myskin,/customstuff/myskin/'; 

ので、似たようなトリックを行う必要があります。

skin: 'office2013,/src/bower_components/ckeditor-office2013-skin/office2013/' 
+0

感謝を! これはプラグインでも機能しますか? –

+0

プラグインの構文は少し異なりますが、それでも可能です:http://docs.ckeditor.com/#!/api/CKEDITOR.resourceManager-method-addExternal 'CKEDITOR.plugins.addExternal( 'sample' 、 '/ myplugins/sample /'); '。注:このコマンドは外部パスのみをプラグインに「登録」します。プラグインをCKEditorインスタンスで使用するには、 'config.extraPlugins'(http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-extraPlugins)を使ってプラグインをオンにする必要があります。 –