Deprecated and Moved to https://combostrap.com/webcode
The Webcode component renders the output of:
- CSS
- HTML
- Javascript or Babel
- Dokuwiki
code block.
By enclosing code block by a <webcode>
block, the plugin will add the result after the last webcode tag.
See the webcode documentation
See the plugin in action here.
Install the plugin using:
- the Plugin Manager
- manually with the download URL, which points to latest version of the plugin.
- Allow Runkit (This code works on JsFiddle but not in webcode ) may be cause by the restrictions. See below.
<iframe name="result" allow="midi *; geolocation *; microphone *; camera *; encrypted-media *;"
sandbox="allow-modals allow-forms allow-scripts allow-same-origin allow-popups allow-top-navigation-by-user-activation" allowfullscreen="" allowpaymentrequest="" frameborder="0" src="">
</iframe>
- More language with:
- sphere-engine - Online example: https://ideone.com
- or [codingground](https://www.tutorialspoint.com/codingground.htm
- Glot.io
- Mermaid Graph Library as language
- Add the console after initial rendering to not select console element via css
Technically, the plugin:
- parses the content between the two
<webcode>
tag, - extracts the html, css and javascript code,
- adds after the last webcode tag an iframe,
- and a button that permits to play with the code on JsFiddle
- The bar (
rendered by
andTry the code
) are now less prominent and follows the prism style - The documentation has moved to ComboStrap.
- Added the possibility to show dokuwiki code if the language extension is dw
- Bug: the babel term was replaced by Javascript also in the code. It should be only on the code definition.
- Bug: trElement was declared two times in two different scope causing problem
- Added the possibility to cache a code block
- Webcode has been restructured (with the use of addPattern) and can now wrap headers (level, section). It can then be used for a howto page.
- Automatic test and travis has been added
- Firebug console was not added when the language was Babel
- The output on the console log is now escaped for HTML entities and can then render HTML
- There was a bug with the declaration of a variable
- To be able to see the output of a
console.log
javascript statement in JsFiddle, the firebug resources have been added (The JsFiddle feature was broken) - New publication date on Dokuwiki
- Added a
renderingMode
argument to be able to show only the result - Added a promotion link
- The links are now after the result.
- 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.
- New lines (\n) are now supported in the javascript console.log function.
- Object of one level are now supported in the javascript console.log function.
- 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
- Jquery is no more used. It was used for the javascript part of the console functionality.
- XML is now seen as HTML
- The ''name''