mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
94a7e34b9a
Bug: T109170 Change-Id: Iccae8f92a19e76d6d203df68d483e0e1d8ca2c38
42 lines
827 B
Plaintext
42 lines
827 B
Plaintext
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>VisualEditor Example</title>
|
|
|
|
<!-- STYLES -->
|
|
|
|
<!-- example styles -->
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
overflow-y: scroll;
|
|
background: #fff;
|
|
font: normal 1em/1.5 sans-serif;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<!-- SCRIPTS -->
|
|
|
|
<!-- example scripts -->
|
|
<script>
|
|
// Ensure ve.init.platform exists for use in examples
|
|
var platform = new ve.init.sa.Platform( ve.messagePaths ).initialize();
|
|
|
|
function loadInlineExample( code, options, callback ) {
|
|
platform.done( function () {
|
|
try {
|
|
eval( code );
|
|
callback && callback( true );
|
|
} catch (e) {
|
|
document.body.appendChild( document.createTextNode( e ) );
|
|
callback && callback( false, e );
|
|
}
|
|
} );
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|