mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 16:20:52 +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 )
|
||||
.appendTo( this.$thumb );
|
||||
|
||||
this.$a = this.$$( '<a>' )
|
||||
.addClass( 'image' )
|
||||
.attr( 'src', this.model.getAttribute( 'href' ) )
|
||||
.appendTo( this.$thumbInner );
|
||||
|
||||
this.$image = this.$$( '<img>' )
|
||||
.addClass( 'thumbimage' )
|
||||
.attr( 'src', this.model.getAttribute( 'src' ) )
|
||||
.attr( 'width', this.model.getAttribute( 'width' ) )
|
||||
.attr( 'height', this.model.getAttribute( 'height' ) )
|
||||
.appendTo( this.$thumbInner );
|
||||
.appendTo( this.$a );
|
||||
};
|
||||
|
||||
/* Inheritance */
|
||||
|
|
Loading…
Reference in a new issue