Merge pull request #6327 from umbraco/v8/feature/6326-RTE-Image-size-as-attribute
store img size as html attributes
This commit is contained in:
@@ -523,10 +523,10 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s
|
||||
|
||||
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, 'width', newSize.width);
|
||||
editor.dom.setAttrib(imgElm, 'height', newSize.height);
|
||||
|
||||
if (img.url) {
|
||||
var src = img.url + "?width=" + newSize.width + "&height=" + newSize.height;
|
||||
editor.dom.setAttrib(imgElm, 'data-mce-src', src);
|
||||
|
||||
Reference in New Issue
Block a user