gitbook-plugin-ace
This page is implemented using the two plugins developed by me: gitbook-plugin-ace
. Please check the Github repo for the syntax and changelog of the plugin.
Example 1
Here is the "Hello World" program of C language. The code editor in this section is set to be editable.
#include <stdio.h>
int main(){
int i;
for(i=0; i<10; i++)
printf("Hello World.");
return 0;
}
Example 2
And a javascript code right here:
var message = 'H e l l o W o r l d';
var split = message.split(' ').join('');
console.log(message);
console.log("testing {{test}}");
Example 3
And a piece of javascript code with wrong syntax, but with syntax validation disabled.
var test = [
somethingIsWrong: 'withThis';
];
Example 4
Custom theme support is also added.
var test = a => (
`ES6 is amazing. ${a}`
);