Skip to content

Commit

Permalink
Merge pull request #62 from mendix/bugfix_appUrl
Browse files Browse the repository at this point in the history
Small bugfix for CKEditor basepath
  • Loading branch information
JelteMX authored Aug 16, 2018
2 parents 429ffa9 + a68252e commit ee48fd3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Binary file modified dist/CKEditorForMendix.mpk
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "CKEditorForMendix",
"version": "2.5.0",
"version": "2.5.1",
"description": "A new WYSIWYG editor for Mendix that also has the ability to create MicroFlow links in your HTML output.",
"license": "Apache License, Version 2",
"author": "Mendix",
Expand Down
14 changes: 7 additions & 7 deletions src/CKEditorForMendix/widget/lib/ckeditor.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/* Mendix CKEditor paths */
((function () {
console.log('CKEDITOR SCRIPT LOADING.');
if (typeof window.mxmob !== 'undefined') {
if (typeof mx.appUrl !== "undefined") {
window.CKEDITOR_BASEPATH = mx.appUrl + 'widgets/CKEditorForMendix/widget/lib/';
} else if (typeof window.mxmob !== 'undefined') {
window.CKEDITOR_BASEPATH = window.mxmob.app._currentURL + 'widgets/CKEditorForMendix/widget/lib/';
window.mxmob.ui.alert(window.CKEDITOR_BASEPATH);
} else {
if (typeof window.mxapp !== 'undefined') {
window.CKEDITOR_BASEPATH = window.mxapp._appUrl + 'widgets/CKEditorForMendix/widget/lib/';
} else if (typeof window.mx !== 'undefined') {
window.CKEDITOR_BASEPATH = mx.appUrl + 'widgets/CKEditorForMendix/widget/lib/';
}
} else if (typeof window.mxapp !== 'undefined' && typeof window.mxapp._appUrl !== "undefined") {
window.CKEDITOR_BASEPATH = window.mxapp._appUrl + 'widgets/CKEditorForMendix/widget/lib/';
} else if (typeof window.mx !== 'undefined') {
window.CKEDITOR_BASEPATH = mx.appUrl + 'widgets/CKEditorForMendix/widget/lib/';
}
}()));

Expand Down
2 changes: 1 addition & 1 deletion src/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="CKEditorForMendix" version="2.5.0" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="CKEditorForMendix" version="2.5.1" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="CKEditorForMendix/CKEditorForMendix.xml"/>
<widgetFile path="CKEditorForMendix/CKEditorViewerForMendix.xml"/>
Expand Down
Binary file modified test/widgets/CKEditorForMendix.mpk
Binary file not shown.

0 comments on commit ee48fd3

Please sign in to comment.