Use ve.ce.nodeFactory.createFromModel

Change-Id: I1a826c3c0985ef0d8ad0b669886e29aa021c90c1
Depends-On: I259face33154b795143c8820abdfb6b4a495f141
This commit is contained in:
Ed Sanders 2018-05-10 17:21:13 +01:00 committed by Jforrester
parent c2e16186a0
commit d7d4eb3126

View file

@ -207,7 +207,7 @@ ve.dm.MWTransclusionNode.static.toDomElements = function ( dataElement, doc, con
} else if ( converter.isForPreview() ) {
modelNode = ve.dm.nodeFactory.createFromElement( dataElement );
modelNode.setDocument( converter.internalList.getDocument() );
viewNode = ve.ce.nodeFactory.create( modelNode.getType(), modelNode );
viewNode = ve.ce.nodeFactory.createFromModel( modelNode );
if ( !viewNode.hasRendering() ) {
viewNode.onSetup();
viewNode.$element