Extension:FloatingUI
FloatingUI Release status: experimental |
|
---|---|
Implementation | Parser function |
Description | implements the FloatingUI Javascript library |
Author(s) | alistair3149 |
Compatibility policy | Master maintains backward compatibility. |
MediaWiki | 1.39+ |
License | GNU General Public License 3.0 or later |
Download | GitHub: Note: |
The FloatingUI extension implements the FloatingUI Javascript library.
Installation
edit- Download and place the file(s) in a directory called
FloatingUI
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'FloatingUI' );
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Usage
editThis extension is in an early stage of development.
Loading library
editThere are several ways to load the library on a given page. Once the library is loaded, it can be accessed through window.FloatingUIDOM
in Javascript.
To attach the library to a wikipage, put the following wikitext onto the page:
{{#floatingui:}}
Or alternatively, you can load the ResourceLoader module in Javascript:
mw.loader.load( 'ext.floatingUI.lib' );
Defining elements
edit- Reference element has to have the HTML class
ext-floatingui-reference
. - Floating element has to have the HTML class
ext-floatingui-content
and place next to the reference element.