The Webcode Dokuwiki plugin renders the output of:
By enclosing the code blocks by a
<webcode> block, the plugin will add the result after the last webcode tag.
See the webcode plugin page on Dokuwiki here
See the plugin in action here.
Install the plugin using:
The allowed webcode attributes are:
- the following attributes of the iframe element
- name. It will be added as a suffix
- frameborder (default to 0)
- width (default to 100%)
- externalResources: a comma separated list of external resources. (Ie an URL of a Css or Js file, generally a CDN)
The actual code blocks supported are:
- code html (or code xml if html is not present). Xml will be seen as XHTML.
- code css
- The console.log function will be rendered and therefore visible in a console area (Gray box).
- The console.table function is supported only for a collection of objects or primitives. There is no second argument.
Technically, the plugin:
- parses the content between the two
- adds after the last webcode tag an iframe,
- and a button that permits to play with the code on JsFiddle
- The 'console.table' function is partially supported
- The 's' variable leaked from the window.console.log function of the webCodeConsole.js
- The height of the Iframe is now dynamically calculated. No need to give this attribute anymore if you want to see the whole output.
- Added Babel support
- Bugs (Https call to Fiddle in place of Http, externalAttributes Resources in the action bar in place of include, Xml was not replaced by HTML code)
- Cache bursting implementation for the weCodeConsole.(js|css) file so that they are not cached for an new version.
- JSFiddle bug 726 makes the resources order not consistent. Solution: More than one resources will be then added in the HTML script element.
- Two block of the same code are now concatenated
- XML is now seen as HTML
- The ''name''