Extension:FloatingUI: Difference between revisions
Appearance
Content deleted Content added
Marked this version for translation |
Marked this version for translation |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 23: | Line 23: | ||
|download-link=[https://github.com/StarCitizenTools/mediawiki-extensions-FloatingUI/archive/main.zip <translate><!--T:4--> Download</translate>] |
|download-link=[https://github.com/StarCitizenTools/mediawiki-extensions-FloatingUI/archive/main.zip <translate><!--T:4--> Download</translate>] |
||
}} |
}} |
||
<translate> |
<translate> |
||
== Usage == <!--T:5--> |
== Usage == <!--T:5--> |
||
| Line 39: | Line 40: | ||
<translate><!--T:10--> To attach the library to a wiki page, put the following wikitext onto the page:</translate> |
<translate><!--T:10--> To attach the library to a wiki page, put the following wikitext onto the page:</translate> |
||
<syntaxhighlight lang="Wikitext" |
<syntaxhighlight lang="Wikitext"> |
||
{{#floatingui:}} |
|||
</syntaxhighlight> |
|||
<translate><!--T:11--> Alternatively, you can load the ResourceLoader module in JavaScript:</translate> |
<translate><!--T:11--> Alternatively, you can load the ResourceLoader module in JavaScript:</translate> |
||
| ⚫ | |||
<syntaxhighlight lang="JavaScript"> |
|||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
</syntaxhighlight> |
|||
| ⚫ | |||
<translate> |
|||
| ⚫ | |||
| ⚫ | |||
</translate> |
|||
| ⚫ | |||
| ⚫ | |||
<translate> |
|||
| ⚫ | |||
</translate> |
|||
{{Used by}} |
{{Used by}} |
||
Latest revision as of 23:40, 6 June 2026
Release status: stable |
|
|---|---|
| Implementation | Parser function |
| Description | Provides the FloatingUI JavaScript library |
| Author(s) | alistair3149 |
| Latest version | 1.0.5 (Continuous updates) |
| Compatibility policy | Master maintains backward compatibility. |
| MediaWiki | 1.43+ |
| Composer | starcitizentools/floating-ui |
| Licence | GNU General Public License 3.0 or later |
| Download | GitHub:
Note: |
The FloatingUI extension provides the FloatingUI JavaScript library to MediaWiki.
Installation
[edit | edit source]- Download and place the file(s) in a directory called
FloatingUIin yourextensions/folder. - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'FloatingUI' );
Done – Navigate to Special:Versionon your wiki to verify that the extension is successfully installed.
Usage
[edit | edit source]Parser function
[edit | edit source]{{#floatingui:reference|content}}
Loading library
[edit | edit source]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
[edit | edit source]- Reference element has to have the HTML class
ext-floatingui-reference. - Floating element has to have the HTML class
ext-floatingui-contentand place next to the reference element.
See also
[edit | edit source]| This extension is included in the following wiki farms/hosts and/or packages: |
