Code editor: multi-language
Our code editor is where you can show off code examples that can be easily copied.
You can add multiple tabs using the same language and use drag-and-drop to reorganize tabs.

When you add a new tab, you can also change the name to something like a file, e.g., main.js
See our example:
fetch("https://api.cakes.com", {
"method": "GET",
"headers": {
"Accept": "application/json"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Markdown
Code block with a single tab
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World!');
}).listen(8080);Use the following Markdown to generate a code block with a single code example:
## Code block
```nodejs
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World!');
}).listen(8080);
```Code blocks without language
// code block not specifiedUse the following Markdown to generate a code block without specifying the language:
## Code blocks
:::::codeblocktabs
```
// code block not specified
```
```
// code block not specified
```
```
// code block not specified
```
:::::Code editor with multiple tabs
// PHP is the best.Use the following Markdown to generate a Code block with multiple tabs:
## Demo Code Blocks
:::::codeblocktabs
```php
// PHP is the best.
```
```java
// and JAVA too
```
```go
// demo go
```
```javascript
// demo js
```
:::::
Find other blocks
Discover new ways and blocks to create stunning and functional documentation pages.

Need help? ⬇️
Use the blue chat bubble from bottom right corner.
Or try AI Chat (from search box) for quick answers.

Your opinion matters
Use the below feedback form, anonymously.
Or ask a question in Q&A section and our team or AI will give you a solution.