代码编辑器:多语言
7 分
我们的代码编辑器可用于展示便于复制的代码示例。
您可以使用相同的语言添加多个选项卡,并使用拖放功能重新组织这些选项卡。

当您添加一个新选项卡时,您还可以将其名称更改为类似文件名的形式,例如,main.js
请查看我们的示例:
fetch("https://api.cakes.com", {
"method": "GET",
"headers": {
"Accept": "application/json"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Markdown
带单个选项卡的代码块
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World!');
}).listen(8080);使用以下 Markdown 可生成一个包含单个代码示例的代码块:
## 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 block not specified使用以下 Markdown 可生成不指定语言的代码块:
## Code blocks
:::::codeblocktabs
```
// code block not specified
```
```
// code block not specified
```
```
// code block not specified
```
:::::具有多个选项卡的代码编辑器
// PHP is the best.使用以下 Markdown 可生成一个带有多个选项卡的代码块:
## Demo Code Blocks
:::::codeblocktabs
```php
// PHP is the best.
```
```java
// and JAVA too
```
```go
// demo go
```
```javascript
// demo js
```
:::::


需要帮助? ⬇️
使用右下角的蓝色 聊天气泡。
或尝试AI 聊天(从搜索框)以快速获取答案。

您的意见很重要
使用下面的反馈表(匿名)。
或在Q&A 区域中提出问题,我们的团队或 AI 将为您提供解决方案。
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.