Added rendering for link/unknown

Change-Id: I47cdc8679c533f15059b290bf30ae74518dce724
This commit is contained in:
Trevor Parscal 2012-06-08 15:15:43 -07:00
parent 773be35b16
commit 402d6dc53a

View file

@ -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;