goyote
goyote

Reputation: 573

How to use wordcount with CDN ckeditor?

Why doesn't this work?

<script src="//cdn.ckeditor.com/4.5.8/standard/ckeditor.js"></script>
<script>
    CKEDITOR.plugins.addExternal('wordcount', '/assets/ckeditor/plugins/wordcount/', 'plugin.js');
    CKEDITOR.replace('body', {
        extraPlugins: 'wordcount',
        customConfig: '/assets/js/ckeditor/config.js'
    });
</script>

ON MY SITE I have the wordcount plugin hosted at (take a guess)

mydomain.com/assets/ckeditor/plugins/wordcount/plugin.js

The error I get:

GET http://cdn.ckeditor.com/404.shtml/ net::ERR_TOO_MANY_REDIRECTS Uncaught Error: [CKEDITOR.resourceManager.load] Resource name "notification" was not found at "http://cdn.ckeditor.com/4.5.8/standard/plugins/notification/plugin.js?t=G2VC"

Upvotes: 1

Views: 1955

Answers (1)

AlfonsoML
AlfonsoML

Reputation: 12690

According to their documentation at https://cdn.ckeditor.com/ the "standard" preset doesn't include any other plugin, you must switch the path to "standard-all" so the rest of the plugins are present.

For me this is a bug on their side as I fail to see any advantage to use "standard" over "standard-all" if the files that are loaded in both situations are the same, but with the disadvantage that it will fail if you try to use any other plugin.

Upvotes: 2

Related Questions