Skip to content

Commit

Permalink
Fix #31 guid in image browser is not passed correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelte Lagendijk committed Mar 10, 2016
1 parent 33b7af5 commit 778420e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
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.0.2",
"version": "2.0.3",
"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
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ CKEDITOR.plugins.add('simple-image-browser', {
$.each(images, function(key, value) {
var element = [
"<div onclick=\"CKEDITOR.tools.simpleimagebrowserinsertpicture('",
value.imageUrl, "',", value.guid,
");\" style=\"position:relative;width:75px;height:75px;margin:5px;background-image:url('",
value.imageUrl, "','", value.guid,
"');\" style=\"position:relative;width:75px;height:75px;margin:5px;background-image:url('",
value.thumbnailUrl,
"');background-repeat:no-repeat;background-size:125%;background-position:center center;float:left;\"></div>"
].join("");
Expand All @@ -83,7 +83,7 @@ CKEDITOR.plugins.add('simple-image-browser', {
var dialog, html;
editor = CKEDITOR.currentInstance;
dialog = CKEDITOR.dialog.getCurrent();
html = '<img data-image-guid="' + guid + '" src="' + event + '" data-cke-saved-src="' + event + '" alt="image" />';
html = '<img data-image-guid="' + guid + '" src="file?guid=' + guid + '" alt="image" />';
editor.config.allowedContent = true;
editor.insertHtml(html.trim());
dialog.hide();
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.0.2" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="CKEditorForMendix" version="2.0.3" 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 778420e

Please sign in to comment.