Extension:FloatingUI
![]() Release status: stableCategory:Stable extensions |
|
---|---|
Implementation | Parser functionCategory:Parser function extensions |
Description | Provides the FloatingUI JavaScript library |
Author(s) | alistair3149 |
Latest version | 0.3.1 (Continuous updates) |
Compatibility policy | Master maintains backward compatibility.Category:Extensions with master compatibility policy |
MediaWiki | 1.39+Category:Extensions with manual MediaWiki version |
Composer | starcitizentools/floating-uiCategory:Extensions supporting Composer |
License | GNU General Public License 3.0 or later |
Download | GitHub: Note: |
The FloatingUI extension provides the FloatingUI JavaScript library to MediaWiki.
Installation
- 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
Parser function
{{#floatingui:reference|content}}
Loading library
There 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 wiki page, put the following wikitext onto the page:
{{#floatingui:}}
Alternatively, you can load the ResourceLoader module in JavaScript:
mw.loader.load( 'ext.floatingUI.lib' );
Defining elements
- 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.
Category:All extensions
Category:Extensions in GitHub version control
Category:Extensions supporting Composer
Category:Extensions with manual MediaWiki version
Category:Extensions with master compatibility policy
Category:Extensions without an image
Category:GPL licensed extensions
Category:ParserFirstCallInit extensions
Category:Parser function extensions
Category:Stable extensions