FriendsOfSymfony / FOSCKEditorBundle

Provides a CKEditor integration for your Symfony project.
Other
522 stars 84 forks source link

Webpack Encore and CDN #195

Closed qdequippe closed 2 years ago

qdequippe commented 5 years ago

Environment

PHP 7.1, Symfony 4.2

Symfony & Node packages

symfony/symfony                 v4.2.11 v4.3.3  The Symfony PHP framework
symfony/webpack-encore-bundle   v1.6.2  v1.6.2  Integration with your Symfony app & Webpack Encore!
@symfony/webpack-encore@0.27.0

Subject

CKEDITOR_BASEPATH does not take into account the CDN configured with Webpack Encore.

Steps to reproduce

  1. Configure the bundle using Webpack Encore
  2. Use a CDN with Webpack Encore

Expected results

...
<script type="text/javascript">
    var CKEDITOR_BASEPATH = "https://MY_CDN_HOST/ckeditor/";
</script>
<script type="text/javascript" src="https://MY_CDN_HOST/ckeditor/ckeditor.js"></script>
...

Actual results

...
<script type="text/javascript">
    var CKEDITOR_BASEPATH = "/build/ckeditor/";
</script>
<script type="text/javascript" src="https://MY_CDN_HOST/ckeditor/ckeditor.js"></script>
...

And here (js) CKEDITOR.basePath is https://CURRENT_HOST/build/ckeditor/ and config dir of CKEDITOR is not found.