From version < 2.2 >
edited by Vincent Massol
on 2019/09/13
To version < 3.1 >
edited by Oana Florea
on 2019/09/13
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.VincentMassol
1 +XWiki.OanaTabaranu
FAQCode.FAQClass[0]
answer
... ... @@ -1,4 +1,4 @@
1 -You can integrate any JavaScript library / component in XWiki. There are multiple ways to do this, see [[https:~~/~~/www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/FrontendResources/IntegratingJavaScriptLibraries/>>Documentation.DevGuide.FrontendResources.IntegratingJavaScriptLibraries.WebHome]] . The recommended way is to:
1 +You can integrate any JavaScript library / component in XWiki. There are multiple ways to do this, see [[Documentation.DevGuide.FrontendResources.IntegratingJavaScriptLibraries.WebHome]]. The recommended way is to:
2 2  
3 3  * install the third party JavaScript as a WebJar using XWiki's Extension Manager
4 4  * load the JavaScript using RequireJS
... ... @@ -8,5 +8,5 @@
8 8  RequireJS implements the AMD (Asynchronous Module Definition) API so the easiest for XWiki is to integrate JavaScript libraries that support AMD. This is the case for instance with React (https://reactjs.org/).
9 9  
10 10  Here are some examples:
11 -* How to integrate React and XWiki: http://www.jria.xwiki.org/xwiki/bin/view/FAQ/How%20to%20integrate%20React%20and%20XWiki
12 -* How to integrate Webpack and XWiki: http://www.jria.xwiki.org/xwiki/bin/view/FAQ/How%20to%20integrate%20Webpack.js%20and%20XWiki
11 +* How to integrate React and XWiki:[[FAQ.How to integrate React and XWiki]]
12 +* How to integrate Webpack and XWiki: [[FAQ.How to integrate Webpack\.js and XWiki]]

You can integrate any JavaScript library / component in XWiki. There are multiple ways to do this, see https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/FrontendResources/IntegratingJavaScriptLibraries/ . The recommended way is to:

You can integrate any JavaScript library / component in XWiki. There are multiple ways to do this, see IntegratingJavaScriptLibraries. The recommended way is to:

  • install the third party JavaScript as a WebJar using XWiki's Extension Manager
  • load the JavaScript using RequireJS

If there's no WebJar package available for the JavaScript library you want to integrate then you can load it from a CDN (such as https://cdnjs.com/ or https://www.jsdelivr.com) or from the file system (by putting the JavaScript code inside XWiki's unpacked WAR).

RequireJS implements the AMD (Asynchronous Module Definition) API so the easiest for XWiki is to integrate JavaScript libraries that support AMD. This is the case for instance with React (https://reactjs.org/).

Here are some examples:

Get Connected