Michael Metternich pushed to branch release/3.2 at cms-community / hippo-cms


Commits:
090b4777 by Michael Metternich at 2018-01-05T12:37:28+01:00
CMS-11031 Backport of CMS-10781

- - - - -


1 changed file:

- 
richtext/ckeditor/plugins/src/main/resources/ckeditor/plugins/hippopicker/plugin.js


Changes:

=====================================
richtext/ckeditor/plugins/src/main/resources/ckeditor/plugins/hippopicker/plugin.js
=====================================
--- 
a/richtext/ckeditor/plugins/src/main/resources/ckeditor/plugins/hippopicker/plugin.js
+++ 
b/richtext/ckeditor/plugins/src/main/resources/ckeditor/plugins/hippopicker/plugin.js
@@ -1,5 +1,5 @@
 /*
- * Copyright 2013-2016 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2013-2018 Hippo B.V. (http://www.onehippo.com)
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -66,7 +66,9 @@
         title: 'f_title',
         target: 'f_target'
       },
-      LANG = editor.lang.hippopicker;
+      LANG = editor.lang.hippopicker,
+      LINK_ALLOWED_CONTENT = 'a[!data-uuid,!href,title,target]',
+      LINK_REQUIRED_CONTENT = 'a[data-uuid,href]';
 
     function createLinkAttributePairs(parameters) {
       var pairs = {};
@@ -158,11 +160,13 @@
       label: LANG.internalLinkTooltip,
       command: 'pickInternalLink',
       toolbar: 'links,5',
-      allowedContent: 'a[!data-uuid,!href,title,target]',
-      requiredContent: 'a[!data-uuid,!href]'
+      allowedContent: LINK_ALLOWED_CONTENT,
+      requiredContent: LINK_REQUIRED_CONTENT
     });
 
     editor.addCommand('pickInternalLink', {
+      allowedContent: LINK_ALLOWED_CONTENT,
+      requiredContent: LINK_REQUIRED_CONTENT,
 
       startDisabled: true,
 
@@ -236,7 +240,9 @@
         width: 'f_width',
         height: 'f_height'
       },
-      LANG = editor.lang.hippopicker;
+      LANG = editor.lang.hippopicker,
+      IMAGE_ALLOWED_CONTENT = 
'img[!data-type,!data-uuid,!src,alt,align,width,height]',
+      IMAGE_REQUIRED_CONTENT = 'img[data-type,data-uuid,src]';
 
     function containsUuid(imageParameters) {
       return imageParameters.hasOwnProperty('f_uuid') && 
imageParameters.f_uuid !== '';
@@ -283,11 +289,13 @@
       label: LANG.imageTooltip,
       command: 'pickImage',
       toolbar: 'insert,5',
-      allowedContent: 'img[!data-type,!data-uuid,!src,alt,align,width,height]',
-      requiredContent: 'img[!data-type,!data-uuid,!src]'
+      allowedContent: IMAGE_ALLOWED_CONTENT,
+      requiredContent: IMAGE_REQUIRED_CONTENT
     });
 
     editor.addCommand('pickImage', {
+      allowedContent: IMAGE_ALLOWED_CONTENT,
+      requiredContent: IMAGE_REQUIRED_CONTENT,
       exec: function () {
         openImagePickerDialog(getSelectedImageOrNull());
       }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/commit/090b4777b373d638f06a3184223ae8a50f2c5d8e

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/commit/090b4777b373d638f06a3184223ae8a50f2c5d8e
You're receiving this email because of your account on code.onehippo.org.
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to