Fix ckeditor path issues
This commit is contained in:
parent
b1ea5551bd
commit
5caf84c10d
|
@ -65,7 +65,7 @@ class TextPlugin(CMSPluginBase):
|
|||
We override the change form template path
|
||||
to provide backwards compatibility with CMS 2.x
|
||||
"""
|
||||
ckeditor_basepath = urljoin(settings.STATIC_URL, 'ckeditor/')
|
||||
ckeditor_basepath = urljoin(settings.STATIC_URL, 'djangocms_text_ckeditor/ckeditor/')
|
||||
if ckeditor_basepath.startswith('//'):
|
||||
protocol = 'https' if request.is_secure else 'http'
|
||||
ckeditor_basepath = '{0}:{1}'.format(protocol, ckeditor_basepath)
|
||||
|
|
|
@ -57,7 +57,8 @@ $(document).ready(function () {
|
|||
}, this.options, options);
|
||||
|
||||
// add additional plugins (autoloads plugins.js)
|
||||
CKEDITOR.plugins.addExternal('cmsplugins', settings.static_url + 'djangocms_text_ckeditor/ckeditor_plugins/cmsplugins/');
|
||||
console.log(settings.static_url);
|
||||
CKEDITOR.plugins.addExternal('cmsplugins', settings.static_url + '/ckeditor_plugins/cmsplugins/');
|
||||
|
||||
// render ckeditor
|
||||
this.editor = CKEDITOR.replace(container, this.options);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block extrahead %}
|
||||
<script src="{% static "djangocms_text_ckeditor/cms/js/modules/cms.base.js" %}"></script>
|
||||
<script src="{% static "cms/js/modules/cms.base.js" %}"></script>
|
||||
<script src="{% static "djangocms_text_ckeditor/ckeditor/ckeditor.js" %}"></script>
|
||||
<script src="{% static "djangocms_text_ckeditor/js/cms.ckeditor.js" %}"></script>
|
||||
{% endblock %}
|
||||
|
@ -21,7 +21,7 @@ $(document).ready(function () {
|
|||
|
||||
var container = $(this).attr('id');
|
||||
CMS.CKEditor.init(container, {{ settings|safe }}, {
|
||||
'static_url': '{{ STATIC_URL }}/djangocms_text_ckeditor',{% if placeholder %}
|
||||
'static_url': '{{ STATIC_URL }}djangocms_text_ckeditor',{% if placeholder %}
|
||||
'add_plugin_url': '{{ placeholder.get_add_url }}',
|
||||
'placeholder_id': {{ placeholder.pk|unlocalize|default:"''" }},
|
||||
'plugin_id': {{ plugin_pk|unlocalize }},
|
||||
|
|
Reference in New Issue