mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-12-01 02:36:47 +00:00
6e73aaf86c
The main components are: - a menu of formula fragment buttons - an ace editor text input into which LaTeX commands are inserted on clicking the buttons - a preview of the formula The deviations from the draft design (full-width menu, smaller buttons, dialog is 'larger' instead of 'large') are so that more buttons can be seen at once. Depends on Ia0f46da2d4 in ve-mw Depends on Ib75fb7b087 in ve-mw Depends on I758f90abb9 in ve-mw Depends on Ibcd941d938 in CodeEditor Depends on Ie814f59086 in oojs-ui Depends on If540670bf2 in oojs-ui Depends on I5f70f133b7 in ve core Bug: T114163 Bug: T118617 Bug: T118618 Change-Id: I96d4b72f2e49ad3f43a2e5c71f0d348fdfb35503
37 lines
836 B
PHP
37 lines
836 B
PHP
<?php
|
|
/**
|
|
* Resource loader module providing extra data from the server to Math.
|
|
*
|
|
* @file
|
|
* @ingroup Extensions
|
|
* @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
class MathDataModule extends ResourceLoaderModule {
|
|
|
|
/* Protected Members */
|
|
|
|
protected $origin = self::ORIGIN_USER_SITEWIDE;
|
|
protected $targets = array( 'desktop', 'mobile' );
|
|
|
|
/* Methods */
|
|
|
|
public function getScript( ResourceLoaderContext $context ) {
|
|
return
|
|
've.ui.MWMathDialog.static.setSymbols(' .
|
|
file_get_contents( __DIR__ . '/modules/ve-math/symbols.json' ) .
|
|
');';
|
|
}
|
|
|
|
public function getDependencies( ResourceLoaderContext $context = null ) {
|
|
return array(
|
|
'ext.math.visualEditor',
|
|
);
|
|
}
|
|
|
|
public function enableModuleContentVersion() {
|
|
return true;
|
|
}
|
|
}
|