mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
Wrap <img> in <a> inside image thumb in order to match MediaWiki parser output.
Change-Id: I91cfcd9ea319b4429abbbe9ddbb07d1cd8a65b62
This commit is contained in:
parent
4f14fddd2b
commit
e196c2f247
|
@ -41,12 +41,17 @@ ve.ce.MWBlockImageNode = function VeCeMWBlockImageNode( model, config ) {
|
||||||
.css( 'width', parseInt( this.model.getAttribute( 'width' ), 10 ) + 2 )
|
.css( 'width', parseInt( this.model.getAttribute( 'width' ), 10 ) + 2 )
|
||||||
.appendTo( this.$thumb );
|
.appendTo( this.$thumb );
|
||||||
|
|
||||||
|
this.$a = this.$$( '<a>' )
|
||||||
|
.addClass( 'image' )
|
||||||
|
.attr( 'src', this.model.getAttribute( 'href' ) )
|
||||||
|
.appendTo( this.$thumbInner );
|
||||||
|
|
||||||
this.$image = this.$$( '<img>' )
|
this.$image = this.$$( '<img>' )
|
||||||
.addClass( 'thumbimage' )
|
.addClass( 'thumbimage' )
|
||||||
.attr( 'src', this.model.getAttribute( 'src' ) )
|
.attr( 'src', this.model.getAttribute( 'src' ) )
|
||||||
.attr( 'width', this.model.getAttribute( 'width' ) )
|
.attr( 'width', this.model.getAttribute( 'width' ) )
|
||||||
.attr( 'height', this.model.getAttribute( 'height' ) )
|
.attr( 'height', this.model.getAttribute( 'height' ) )
|
||||||
.appendTo( this.$thumbInner );
|
.appendTo( this.$a );
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Inheritance */
|
/* Inheritance */
|
||||||
|
|
Loading…
Reference in a new issue