Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP test for @iionly #10742

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions mod/ckeditor/start.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ function ckeditor_init() {
elgg_extend_view('elgg/wysiwyg.css', 'elements/typography.css', 100);

elgg_define_js('ckeditor', array(
'deps' => ['elgg/ckeditor/set-basepath'],
'exports' => 'CKEDITOR',
));
elgg_define_js('jquery.ckeditor', array(
Expand All @@ -24,7 +23,7 @@ function ckeditor_init() {
));

// need to set basepath early
elgg_extend_view('elgg.js', 'elgg/ckeditor/set-basepath.js');
elgg_extend_view('elgg.js', 'elgg/ckeditor/set-basepath', 499);

elgg_extend_view('input/longtext', 'ckeditor/init');

Expand Down
8 changes: 0 additions & 8 deletions mod/ckeditor/views/default/elgg/ckeditor/set-basepath.js

This file was deleted.

9 changes: 9 additions & 0 deletions mod/ckeditor/views/default/elgg/ckeditor/set-basepath.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
// note: previous attempts at setting this via an AMD module sometimes failed to
// set it before the CKeditor library was loaded. This resulted in CKeditor pulling
// resources from the wrong paths.

$path = elgg_get_simplecache_url('ckeditor') . "/";

?>
window.CKEDITOR_BASEPATH = <?= json_encode($path) ?>;