---
title: Éditeur de code : multilingue
slug: docs/fr/editeur-de-code-multilingue
description: Ce document offre un éditeur de code complet qui permet aux utilisateurs d’afficher et de copier facilement des exemples de code. Avec la possibilité de créer plusieurs onglets et de les réorganiser par un simple glisser-déposer, les utilisateurs peuvent 
createdAt: 2020-11-13T12:28:51.000Z
---

Notre éditeur de code est l’endroit où vous pouvez présenter des exemples de code qui peuvent être facilement copiés.

Vous pouvez ajouter plusieurs onglets en utilisant le même langage et utiliser le glisser-déposer pour réorganiser les onglets.

![](https://api.archbee.com/api/optimize/bNBm7nPJgXjbjLyfbHNh2/THSqdEtr4ZHb3KqpazPfo_f4dgqb8.gif)

Lorsque vous ajoutez un nouvel onglet, vous pouvez également changer son nom pour quelque chose ressemblant à un fichier, par exemple, `main.js`

Voyez notre exemple :

:::CodeblockTabs
main.js

```javascript
fetch("https://api.cakes.com", {
  "method": "GET",
  "headers": {
    "Accept": "application/json"
  }
})
.then(response => {
  console.log(response);
})
.catch(err => {
  console.error(err);
});

```

```go
// We can use channels to synchronize execution
// across goroutines. Here's an example of using a
// blocking receive to wait for a goroutine to finish.
// When waiting for multiple goroutines to finish,
// you may prefer to use a [WaitGroup](waitgroups).

package main

import "fmt"
import "time"

// This is the function we'll run in a goroutine. The
// `done` channel will be used to notify another
// goroutine that this function's work is done.
func worker(done chan bool) {
    fmt.Print("working...")
    time.Sleep(time.Second)
    fmt.Println("done")

    // Send a value to notify that we're done.
    done <- true
}

func main() {

    // Start a worker goroutine, giving it the channel to
    // notify on.
    done := make(chan bool, 1)
    go worker(done)

    // Block until we receive a notification from the
    // worker on the channel.
    <-done
}

```

```python
# Python3 program to demonstrate 
# the use of sample() function . 
  
# import random  
import random 
  
  
# Prints list of random items of 
# length 3 from the given list. 
list1 = [1, 2, 3, 4, 5, 6]  
print("With list:", random.sample(list1, 3)) 
  
# Prints list of random items of 
# length 4 from the given string.  
string = "GeeksforGeeks"
print("With string:", random.sample(string, 4)) 
  
# Prints list of random items of 
# length 4 from the given tuple. 
tuple1 = ("ankit", "geeks", "computer", "science", 
                   "portal", "scientist", "btech") 
print("With tuple:", random.sample(tuple1, 4)) 
  
  
# Prints list of random items of 
# length 3 from the given set. 
set1 = {"a", "b", "c", "d", "e"} 
print("With set:", random.sample(set1, 3)) 
```

```php
<?php
$name = "Quincy";
echo "Hi! My name is " . $name . "<br>";
echo "Hi! My name is " . $NAME . "<br>";
echo "Hi! My name is " . $NaMe . "<br>";
?>
```

```csharp
/*
 * C# Program to Check Whether the Entered Year is a Leap Year or Not
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace Program
{
    class leapyear
    {
        static void Main(string[] args)
        {
            leapyear obj = new leapyear();
            obj.readdata();
            obj.leap();
        }
        int y;
        public void readdata()
        {
            Console.WriteLine("Enter the Year in Four Digits : ");
            y = Convert.ToInt32(Console.ReadLine());
        }
        public void leap()
        {
            if ((y % 4 == 0 && y % 100 != 0) || (y % 400 == 0))
            {
                Console.WriteLine("{0} is a Leap Year", y);
            }
            else
            {
                Console.WriteLine("{0} is not a Leap Year", y);
            }
            Console.ReadLine();
        }
    }
}
```
:::

## Markdown

### Bloc de code avec un seul onglet

```nodejs
var http = require('http');

http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World!');
}).listen(8080);
```

Utilisez le Markdown suivant pour générer un bloc de code avec un seul exemple de code :

````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);
```
````

### Blocs de code sans langage

:::CodeblockTabs
```text
// code block not specified
```

```text
// code block not specified
```

```text
// code block not specified
```
:::

Utilisez le Markdown suivant pour générer un bloc de code sans spécifier le langage :

````markdown
## Code blocks

:::::codeblocktabs

```
// code block not specified
```

```
// code block not specified
```

```
// code block not specified
```

:::::
````

### Éditeur de code avec plusieurs onglets

:::CodeblockTabs
```php
// PHP is the best.
```

```java
// and JAVA too
```

```go
// demo go
```

```javascript
// demo js
```
:::

Utilisez le Markdown suivant pour générer un bloc de code avec plusieurs onglets :

````markdown
## Demo Code Blocks

:::::codeblocktabs

```php
// PHP is the best.
```

```java
// and JAVA too
```

```go
// demo go
```

```javascript
// demo js
```

:::::
````

***

::::LinkArray{contentSource="CUSTOM"}
:::LinkArrayItem{headerType="IMAGE" headerImage="https://api.archbee.com/api/optimize/K_JWZranXy1tD6qvlG2v6-C1IcmVcG0rx4ZLHX6X7V7-20250911-192557.png"}
:FontAwesome[]{icon="fa-solid fa-cubes"} &#x20;**&#x20;Trouver d’autres blocs**

Découvrez de nouvelles façons et de nouveaux blocs pour créer des pages de documentation superbes et fonctionnelles.

[Voir tous les blocs](docId\:oSw7o7IGH93-6KHkyg-eL)&#x20;
:::

:::LinkArrayItem{headerType="IMAGE" headerImage="https://api.archbee.com/api/optimize/K_JWZranXy1tD6qvlG2v6-YRyGGWKsNS1ZZJa5XJy0z-20250911-192608.png"}
:FontAwesome[]{icon="fa-solid fa-headset"}**&#x20; Besoin d’aide?  ⬇️**

Utilisez la **bulle de discussion** **bleue** dans le coin inférieur droit.

Ou essayez **Chat IA** (depuis la barre de recherche) pour des réponses rapides.
:::

:::LinkArrayItem{headerType="IMAGE" headerImage="https://api.archbee.com/api/optimize/K_JWZranXy1tD6qvlG2v6-MS_ubDHlXgoktt4svD2rL-20250911-192619.png"}
:FontAwesome[]{icon="fa-solid fa-hand-holding-heart"}**&#x20;  Votre opinion compte**

Utilisez le formulaire de rétroaction ci-dessous, de manière anonyme.

Ou posez une question dans la **section Q\&A** et notre équipe ou l’IA vous donnera une solution.
:::
::::

