Skip to content

Latest commit

 

History

History
69 lines (57 loc) · 1.32 KB

README.md

File metadata and controls

69 lines (57 loc) · 1.32 KB

code-editor

Demo

Try demo here https://luanche.github.io/code-editor/

Usage

<head>
    <link rel="stylesheet" type="text/css" href="./dist/css/icons.css">
    <link rel="stylesheet" type="text/css" href="./dist/css/editor.css">
    <link rel="stylesheet" type="text/css" href="./dist/css/theme/dark.css">
    <script src="https://cdn.staticfile.org/jquery/3.6.0/jquery.min.js"></script>
</head>

<div id="editor-outter-c"></div>

<script src="./dist/editor.js"></script>
<script src="./dist/language/c.js"></script>

<script>
    var editor_c = new Editor("editor-outter-c", {
        language: 'c'
    });
</script>

Theme

dark theme
<link rel="stylesheet" type="text/css" href="./dist/css/theme/dark.css">
light theme
<link rel="stylesheet" type="text/css" href="./dist/css/theme/light.css">

Languages support

c
<script src="./dist/language/c.js"></script>
<script>
var editor = new Editor("editor-outter", {
    language: 'c'
});
</script>
cpp
<script src="./dist/language/cpp.js"></script>
<script>
var editor = new Editor("editor-outter", {
    language: 'cpp'
});
</script>
python
<script src="./dist/language/python.js"></script>
<script>
var editor = new Editor("editor-outter", {
    language: 'python'
});
</script>