CKEditorのconfigがどうやっても反映されなくて泣いていた.
公式に沿って,
headタグで
<script src="asset('ckeditor/ckeditor.js')"></script>
を読み込んでbodyの最後で,
<script type="text/javascript">
CKEDITOR.replace('profile');
</script>
こうやれば,id="profile"がCKEditorに置き換わった.
でだ,
設定変えたくて,デフォルトのconfig.jsとは別に同じ階層に作った,config2.jsを読み込もうとしたのさ.
こんな感じで公式に沿った.
<script type="text/javascript">
CKEDITOR.replace('profile',{ customConfig: '/ckeditor/ckeditor2.js' });
</script>
反映されない.
2時間は悩んだ.
CSSで無理やり消したりもした.
結果
これで解決できた.
<script type="text/javascript">
CKEDITOR.config.customConfig = '/ckeditor/adminconfig.js';
CKEDITOR.replace('profile');
</script>
先にcustomConfigを置き換えてから.replaceだった.
睡眠時間返してほしい.