Search Extensions
Last modified by Vincent Massol on 2014/10/21 14:38
Refine your search
Select a category and activate filters on the current results
Location
Creator
Last modification date
Creation date
Object type
-
Extension
688
-
Extension
685
-
Extension Version
580
-
Extension Proxy
366
-
Extension Dependency
356
- … 19 more
File type
Upload date
Code Macro
Located in
- Title
Code Macro
- Objects
comment : I changed the collibri CSS file, there are .code (and .box) styles used to demark code blocks.
… …comment : Code macro use inline style only for colors, general font style is done at .code CSS class level
…comment : Since 2.4M1 it's easily configurable in xwiki.properties files: {{code}} rendering.macro.code.pygments.style=friendly {{/code}}
- Page
Code Macro
Remote Code Macro
Located in
- Title
Remote Code Macro
- Objects
|=Parameter|=Description |language|The language to use for the syntax coloring, accepts the values found in the [[Code Macro>>Code Macro]] |source|The URL to the remote code to include and color == Code == {{code}} {{remotecode language="javascript" source="http://svn.xwiki.org/svnroot/xwiki/platform/web/tags/xwiki-web-2.0/standard/src/main/webapp/resources/uicomponents/search/search.js" /}} {{/code}} == Result == image:remotecode.png
…id : jvelociter:remote-code-macro
… …name : Remote Code Macro
- Attachment content
XWiki/RemoteCodeMacro.xml XWiki RemoteCodeMacro 0 XWiki.jvelociter XWiki.jvelociter XWiki.jvelociter 1255096195000 1290607130000 1290607130000 15.1 "Remote Code" Macro false xwiki/2.0 false XWiki.TagClass 0 0 input 1 tags 1 Tags 1 ,| 30 0 com.xpn.xwiki.objects.classes.StaticListClass XWiki.RemoteCodeMacro 0 XWiki.TagClass b0f51578-bc87-4677-8ef7-3713e28b3557 XWiki.WikiMacroClass 0 code 8 Macro code 5 40 0 com.xpn.xwiki.objects.classes.TextAreaClass 0 contentDescription 7 Content description (Not applicable for "No content" type) 5 40 0 com.xpn.xwiki.objects.classes.TextAreaClass 0 0 select 0 contentType 6 Macro content type 0 | | 1 0 Mandatory|Optional|No content com.xpn.xwiki.objects.classes.StaticListClass 0 defaultCategory 4 Default category 30 0 com.xpn.xwiki.objects.classes.StringClass 0 description 3 Macro description 5 40 0 com.xpn.xwiki.objects.classes.TextAreaClass 0 id 1 Macro id 30 0 com.xpn.xwiki.objects.classes.StringClass 0 name 2 Macro name 30 0 com.xpn.xwiki.objects.classes.StringClass 0 select select supportsInlineMode 5 Supports inline mode 0 com.xpn.xwiki.objects.classes.BooleanClass 0 0 select 0 visibility 9 Macro visibility 0 | | 1 0 Current User|Current Wiki|Global com.xpn.xwiki.objects.classes.StaticListClass XWiki.RemoteCodeMacro 0 XWiki.WikiMacroClass 3578846d-5f85-4321-a24f-8a37ccbbe1d0 {{groovy}} println "{{code" + (xcontext.macro.params.language ? " language=" + xcontext.macro.params.language : "") + "}}" println xwiki.getURLContent(xcontext.macro.params.source) println "{{/code}}" {{/groovy}} No content Displays the code (using the {{code}} macro) of a remote file remotecode Remote Code 0 Global XWiki.WikiMacroParameterClass 0 defaultValue 4 Parameter default value 30 0 com.xpn.xwiki.objects.classes.StringClass 0 description 2 Parameter description 5 40 0 com.xpn.xwiki.objects.classes.TextAreaClass 0 select select mandatory 3 Parameter mandatory 0 com.xpn.xwiki.objects.classes.BooleanClass 0 name 1 Parameter name 30 0 com.xpn.xwiki.objects.classes.StringClass XWiki.RemoteCodeMacro 0 XWiki.WikiMacroParameterClass 0b268e53-e41c-4f41-8297-c4169dd3ab01 The URI at which the file is located. For example : http://svn.xwiki.org/svnroot/xwiki/platform/web/tags/xwiki-web-2.0/standard/src/main/webapp/resources/uicomponents/widgets/confirmationBox.js 1 source XWiki.WikiMacroParameterClass 0 defaultValue 4 Parameter default value 30 0 com.xpn.xwiki.objects.classes.StringClass 0 description 2 Parameter description 5 40 0 com.xpn.xwiki.objects.classes.TextAreaClass 0 select select mandatory 3 Parameter mandatory 0 com.xpn.xwiki.objects.classes.BooleanClass 0 name 1 Parameter name 30 0 com.xpn.xwiki.objects.classes.StringClass XWiki.RemoteCodeMacro 1 XWiki.WikiMacroParameterClass a78cf06c-b61f-4b17-a35d-1f0e9bb9d450 The language of the source code to display. Will be passed over to the code macro. 0 language == Example == === Code === {{code}} {{remotecode language="javascript" source="http://svn.xwiki.org/svnroot/xwiki/platform/web/tags/xwiki-web-2.0/standard/src/main/webapp/resources/uicomponents/widgets/confirmationBox.js" /}} {{/code}} === Result === {{remotecode language="javascript" source="http://svn.xwiki.org/svnroot/xwiki/platform/web/tags/xwiki-web-2.0/standard/src/main/webapp/resources/uicomponents/widgets/confirmationBox.js" /}} package.xml XWiki.RemoteCodeMacro LGPL XWiki 1.0.0 false false XWiki.RemoteCodeMacro
- Attachment name
XWiki.RemoteCodeMacro.xar
- Page
Remote Code Macro
Code Macro (Radeox)
Located in
- Rendered document content
Pretty prints code snippets. XWiki's code macro inherits from Radeox's code macro and has the same features.
- Title
Code Macro (Radeox)
- Raw document content
{{/info}} XWiki's code macro inherits from Radeox's code macro and has the same features. == Usage == {{code language="none"}} {code[:none|:java|:xml|:sql]} {{/code}} === Parameters definition === * ##none##: no formatting * ##java##: forces the pretty printer to use the Java coloring scheme.
…</world> </hello> {code} {code:sql} SELECT * FROM TABLE; {code} {{/code}} === Result === {{code}} public class MyClass { public void helloWorld() {} } {{/code}} {{code language="xml"}} <hello> <world>Cool!</world> </hello> {{/code}} {{code language="sql"}} SELECT * FROM TABLE; {{/code}}
- Page
Code Macro (Radeox)
Code Macro
Located in
- Title
Code Macro
- Objects
{{/code}} {{/code}} Inline mode: {{code language="none"}} Some content {{code language=<providedlanguage>}}... code here...
…</head> </html> {{/code}} {{/code}} === Result === {{code language="html"}} <html> <head>Cool!
… …name : Code Macro
- Location
-
…
Code Macro
Caching Code Macro
Located in
- Title
Caching Code Macro
- Objects
id : org.xwiki.contrib:macro-code-cached
… …name : Caching Code Macro
…properties : maven.artifactid=macro-code-cached
- Location
-
…
Caching Code Macro
XWikiWatchDeveloperGuide
Located in
- Rendered document content
Where is the XWiki Watch code XWatch is a XWiki application (.xar) that uses the feed plugin in the platform (activated by default) and the xwiki-web-gwt API in web.
…The code is in: the feed plugin, which reads data from the stored feeds and stores the articles in the article documents (therefore all the article documents & objects are created here and the feed documents are updated to match the new data) the xwiki-web-gwt module, which contains GWT Api for the most frequent xwiki actions (documents / objects retrieval and edit), all exposed through the XWikiService (XWikiServiceImpl) interface. the Watch GWT client code - which contains the Watch GWT specific code: it is only client code, which means it cannot access data or functions from the server otherwise but through the XWikiService. The GWT code handles the Watch Reader: interface, data fetching, data display, update of data on the server on user actions, etc XWiki sheets and documents: used to either execute code for the GWT component in a REST-like manner (the GWT calls an URL, gets the result and uses it as HTML) or to expose the watch data on the server in the wiki: WatchSheets, WatchCode spaces. starting with 1.1 M1, there also is a XWikiWatch GWT server-code, which is nothing else but a GWT Servlet implementing a Watch specific service Application flow
- Raw document content
* the Watch GWT client code - which contains the Watch GWT specific code: it is only client code, which means it cannot access data or functions from the server otherwise but through the XWikiService.
…When importing it it overrides old code so this is the only thing needed to be done, even for reinstall. Keep in mind that browsers cache js code, and, if you change .js code and you don't see the changes, think about convincing your browser to get new js code (clearing cache for Firefox usually does it)
Customization
Located in
- Rendered document content
On XWiki 8.1M1+ you can create a JavaScript extension with the following code: Don't forget to set "Use this extension" to "On this wiki".
…This means, for instance, that if the edited content is using a macro that requires some JavaScript code in order to be displayed properly then that JavaScript code is not executed and thus the macro output doesn't look good inside the editing area. There are multiple reasons for this behavior: loading and executing the JavaScript code slows down the editor the JavaScript code could modify the edited content (outside of the protected macro output) and these changes would be saved the JavaScript code could throw exceptions or interfere with the CKEditor code thus breaking the editor which may lead to content loss executing the JavaScript code opens the door to XSS attacks One way to fix the macro output, while still being safe with respect to JavaScript, is to modify the macro code so that it behaves differently when executed in WYSIWYG edit mode.
- Raw document content
On XWiki 8.1M1+ you can create a [[JavaScript extension>>xwiki:Documentation.DevGuide.Tutorials.SkinExtensionsTutorial.WebHome]] with the following code:((( {{code language="js"}} require(['deferred!
…There are multiple reasons for this behavior: * loading and executing the JavaScript code slows down the editor * the JavaScript code could modify the edited content (outside of the protected macro output) and these changes would be saved * the JavaScript code could throw exceptions or interfere with the CKEditor code thus breaking the editor which may lead to content loss * executing the JavaScript code opens the door to XSS attacks One way to fix the macro output, while still being safe with respect to JavaScript, is to modify the macro code so that it behaves differently when executed in WYSIWYG edit mode.
…Enable the loading of the JavaScript Skin Extensions from the CKEditor administration section 1. Modify the macro code to mark the scripts that are safe to be loaded inside the editing area:((( {{code language="none"}} #set ($discard = $xwiki.jsx.use('Path.To.MyMacro', {'wysiwyg': true})) {{/code}} ))) 1.





