trusty-cms 7.0.42 → 7.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,7 +15,7 @@ export default class AssetTagBuilder extends Plugin {
15
15
  allowWhere: '$text',
16
16
  isInline: true,
17
17
  isObject: true,
18
- allowAttributes: [ 'id', 'size', 'alt' ]
18
+ allowAttributes: [ 'id', 'size', 'alt', 'height', 'width' ]
19
19
  } );
20
20
  }
21
21
 
@@ -35,10 +35,14 @@ export default class AssetTagBuilder extends Plugin {
35
35
  const id = viewElement.getAttribute( 'id' );
36
36
  const size = viewElement.getAttribute( 'size' );
37
37
  const alt = viewElement.getAttribute( 'alt' );
38
+ const height = viewElement.getAttribute( 'height' );
39
+ const width = viewElement.getAttribute( 'width' );
38
40
 
39
41
  if ( id ) attrs.id = id;
40
42
  if ( size ) attrs.size = size;
41
43
  if ( alt ) attrs.alt = alt;
44
+ if ( height ) attrs.height = height;
45
+ if ( width ) attrs.width = width;
42
46
 
43
47
  return writer.createElement( 'assetImage', attrs );
44
48
  }
@@ -52,10 +56,14 @@ export default class AssetTagBuilder extends Plugin {
52
56
  const id = modelElement.getAttribute( 'id' );
53
57
  const size = modelElement.getAttribute( 'size' );
54
58
  const alt = modelElement.getAttribute( 'alt' );
59
+ const height = modelElement.getAttribute( 'height' );
60
+ const width = modelElement.getAttribute( 'width' );
55
61
 
56
62
  if ( id ) attrs.id = id;
57
63
  if ( size ) attrs.size = size;
58
64
  if ( alt ) attrs.alt = alt;
65
+ if ( height ) attrs.height = height;
66
+ if ( width ) attrs.width = width;
59
67
 
60
68
  return writer.createEmptyElement( 'r:asset:image', attrs );
61
69
  }
@@ -69,10 +77,14 @@ export default class AssetTagBuilder extends Plugin {
69
77
  const id = modelElement.getAttribute( 'id' );
70
78
  const size = modelElement.getAttribute( 'size' );
71
79
  const alt = modelElement.getAttribute( 'alt' );
80
+ const height = modelElement.getAttribute( 'height' );
81
+ const width = modelElement.getAttribute( 'width' );
72
82
 
73
83
  if ( id ) attrs.id = id;
74
84
  if ( size ) attrs.size = size;
75
85
  if ( alt ) attrs.alt = alt;
86
+ if ( height ) attrs.height = height;
87
+ if ( width ) attrs.width = width;
76
88
 
77
89
  return writer.createContainerElement( 'r:asset:image', attrs );
78
90
  }
@@ -1,3 +1,3 @@
1
1
  module TrustyCms
2
- VERSION = '7.0.42'.freeze
2
+ VERSION = '7.0.43'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trusty-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.42
4
+ version: 7.0.43
5
5
  platform: ruby
6
6
  authors:
7
7
  - TrustyCms CMS dev team