mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 14:33:59 +00:00
62aeb254d9
Refactored the (previously unused) eg-iframe file to be a template with 2 placeholders for script and styles. The previous version was just the basic version to execute javascript code, but that's not good enough since we need a whole bunch of classes to be loaded. A bash file processes the template into proper html, with the help of the makeStaticLoader maintenance script we already had. Updated demo.css, cleaned up redundant properties restyled slightly to be more like the Vector skin and less "raw". Fixed default $IP path in makeStaticLoader.php to work with simple mediawiki core installs having the extension in the regular extensions directory, and prefixed __DIR__ so it doesn't rely on the directory you call it from. Change-Id: Ic789121dfeca08d9db69564d2ad2e52b3fa45de9
32 lines
569 B
Smarty
32 lines
569 B
Smarty
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>VisualEditor Examples</title>
|
|
{{VE-LOAD-HEAD}}
|
|
<script>
|
|
function loadInlineExample(code, options, callback) {
|
|
try {
|
|
eval(code);
|
|
callback && callback(true);
|
|
} catch (e) {
|
|
document.body.appendChild(document.createTextNode(e));
|
|
callback && callback(false, e);
|
|
}
|
|
}
|
|
</script>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
overflow-y: scroll;
|
|
background: #fff;
|
|
font: normal 1em/1.5 sans-serif;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
{{VE-LOAD-BODY}}
|
|
</body>
|
|
</html>
|