Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
After upgrading to 7.4.0, I still get error messages on validations (validator.w3.org) when I put images into the control Rich text editor
rel attribute: Still getting numerical value (the same value as in data-id)
id attribute: Gets the same value (__mcenew) for all images
When images are inserted as control Image there are no id, rel and data-id attribute in the img-tag.
Is there a solution on how validation can be correct when using the RTE-control?
NOTE: Text changed to version 7.4.0.
I think I remember this should be fixed in 7.3.0, but maybe I remember wrong. Anyone..?
Not sure about 7.3, but this is certainly a bug we've encountered in 7.2.8
It looks like the problem is within the umbraco.service.js
Answer below :-) \/ \/
* @ngdoc method * @name umbraco.services.tinyMceService#createMediaPicker * @methodOf umbraco.services.tinyMceService * * @description * Creates the umbrco insert media tinymce plugin * * @param {Object} editor the TinyMCE editor instance * @param {Object} $scope the current controller scope */ createMediaPicker: function (editor) { editor.addButton('umbmediapicker', { icon: 'custom icon-picture', tooltip: 'Media Picker', onclick: function () { var selectedElm = editor.selection.getNode(), currentTarget; if(selectedElm.nodeName === 'IMG'){ var img = $(selectedElm); currentTarget = { altText: img.attr("alt"), url: img.attr("src"), id: img.attr("id") }; } userService.getCurrentUser().then(function(userData) { dialogService.mediaPicker({ currentTarget: currentTarget, onlyImages: true, showDetails: true, startNodeId: userData.startMediaId, callback: function (img) { if (img) { var data = { alt: img.altText || "", src: (img.url) ? img.url : "nothing.jpg", id: img.id }; editor.insertContent(editor.dom.createHTML('img', data)); $timeout(function () { var imgElm = editor.dom.get('img.id'); var size = editor.dom.getSize(imgElm); if (editor.settings.maxImageSize && editor.settings.maxImageSize !== 0) { var newSize = imageHelper.scaleToMaxSize(editor.settings.maxImageSize, size.w, size.h); var s = "width: " + newSize.width + "px; height:" + newSize.height + "px;"; editor.dom.setAttrib(imgElm, 'style', s); editor.dom.setAttrib(imgElm, 'id', null); if (img.url) { var src = img.url + "?width=" + newSize.width + "&height=" + newSize.height; editor.dom.setAttrib(imgElm, 'data-mce-src', src); } } }, 500); } } }); }); } }); },
This fixes the problem in 7.2.8, I suspect it'd work on earlier versions too.
Thanks, no error messages on validations (validator.w3.org).
I have Umbraco version 7.3.1 assembly: 1.0.5780.28249, and this bug is still there..
This solution work, but will dissapair with every upgrading to a new version. I've now installed Umbraco version 7.3.3, and this is still not fixed.
And the same in 7.3.4 - still not fixed.
Just installed version 7.4.0, and still not implemented. When will this solution be an official part of Umbraco?
Bug since 7.2.1 still in progress: http://issues.umbraco.org/issue/U4-6228
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Validation when using RTE: rel and id attribute - not fixed in v. 7.4.0.
After upgrading to 7.4.0, I still get error messages on validations (validator.w3.org) when I put images into the control Rich text editor
rel attribute: Still getting numerical value (the same value as in data-id)
id attribute: Gets the same value (__mcenew) for all images
When images are inserted as control Image there are no id, rel and data-id attribute in the img-tag.
Is there a solution on how validation can be correct when using the RTE-control?
NOTE: Text changed to version 7.4.0.
I think I remember this should be fixed in 7.3.0, but maybe I remember wrong. Anyone..?
Not sure about 7.3, but this is certainly a bug we've encountered in 7.2.8
It looks like the problem is within the umbraco.service.js
Answer below :-) \/ \/
This fixes the problem in 7.2.8, I suspect it'd work on earlier versions too.
Thanks, no error messages on validations (validator.w3.org).
I have Umbraco version 7.3.1 assembly: 1.0.5780.28249, and this bug is still there..
This solution work, but will dissapair with every upgrading to a new version. I've now installed Umbraco version 7.3.3, and this is still not fixed.
And the same in 7.3.4 - still not fixed.
Just installed version 7.4.0, and still not implemented. When will this solution be an official part of Umbraco?
Bug since 7.2.1 still in progress: http://issues.umbraco.org/issue/U4-6228
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.