2013-02-20 19:44:44 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor Standalone Initialization Target class.
|
|
|
|
*
|
|
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialization Standalone target.
|
|
|
|
*
|
2013-05-10 00:17:51 +00:00
|
|
|
* @example
|
|
|
|
* new ve.init.sa.Target(
|
|
|
|
* $( '<div>' ).appendTo( 'body' ), ve.createDocumentFromHTML( '<p>Hello world.</p>' )
|
|
|
|
* );
|
|
|
|
*
|
2013-02-20 19:44:44 +00:00
|
|
|
* @class
|
|
|
|
* @extends ve.init.Target
|
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {jQuery} $container Container to render target into
|
2013-05-10 00:17:51 +00:00
|
|
|
* @param {ve.dm.Document} doc Document model
|
2013-02-20 19:44:44 +00:00
|
|
|
*/
|
2013-05-10 00:17:51 +00:00
|
|
|
ve.init.sa.Target = function VeInitSaTarget( $container, doc ) {
|
2013-02-20 19:44:44 +00:00
|
|
|
// Parent constructor
|
|
|
|
ve.init.Target.call( this, $container );
|
2013-05-10 00:17:51 +00:00
|
|
|
|
|
|
|
// Properties
|
|
|
|
this.surface = new ve.Surface( this, doc );
|
|
|
|
|
|
|
|
// Initialization
|
|
|
|
this.setupToolbarFloating();
|
2013-02-20 19:44:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
ve.inheritClass( ve.init.sa.Target, ve.init.Target );
|