mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Added rendering for link/unknown
Change-Id: I47cdc8679c533f15059b290bf30ae74518dce724
This commit is contained in:
parent
773be35b16
commit
402d6dc53a
|
@ -103,6 +103,13 @@ ve.ce.TextNode.annotationRenderers = {
|
|||
return '<span class="ve-ce-content-format-link" data-title="wiki/' + data.title + '">';
|
||||
},
|
||||
'close': '</span>'
|
||||
},
|
||||
'link/unknown': {
|
||||
'open': function( data ) {
|
||||
if ( !data) { debugger; }
|
||||
return '<span class="ve-ce-content-format-link" data-href="' + data.href + '">';
|
||||
},
|
||||
'close': '</span>'
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -154,6 +161,9 @@ ve.ce.TextNode.prototype.getHtml = function() {
|
|||
|
||||
for ( var hash in annotations ) {
|
||||
annotation = annotations[hash];
|
||||
if ( renderers[annotation.type] === undefined ) {
|
||||
debugger;
|
||||
}
|
||||
out += typeof renderers[annotation.type].open === 'function' ?
|
||||
renderers[annotation.type].open( annotation.data ) :
|
||||
renderers[annotation.type].open;
|
||||
|
|
Loading…
Reference in a new issue