Code Monkey home page Code Monkey logo

minicodeeditor's Introduction

Mini Code Editor

Simple and free code editor for your web applications

Demo

Table of contents

About Mini Code Editor

My goal is to create a code editor that is easy to import, easy to configure and has a license that is copyleft (WHY IS EVERYTHING MIT????).
Works on (Tested on): Firefox, Chrome, Badwolf and Pale Moon.

Supported languages

  • C
  • CSS
  • HTML (consequently XML)
  • Javascript
  • Python
  • Shell
  • SQLite

More coming soon...

Setup

<div id='editor'></div>

<!-- Import the editor -->
<script src='src/editor.js'></script>

<!-- Import the language -->
<script src='languages/html.js'></script>


<script>
	const EDITOR = new MiniCodeEditor('#editor')
	EDITOR.setRules(HTML_RULES)
	// Some configuration (optional)
	EDITOR.setWordWrap(false)
	EDITOR.setReadOnly(false)
	EDITOR.setFontSize(24)
	// Set editor text
	EDITOR.setValue('Hello world')
	// Get editor text
	console.log(EDITOR.getValue())
</script>

Code fast with snippets

Write the keyword and then press Ctrl + Space to instantly generate the code block.

Press F1 inside the code editor to view a list of current snippets

Theming

Mini Code Editor color theme is edited using CSS:

Here is an example of a dark theme

body[theme="dracula"] {
    --mce-color-blue: #8be9fd;
    --mce-color-red: #ff5555;
    --mce-color-green: #50fa7b;
    --mce-color-orange: #ffb86c;
    --mce-color-purple: #bd93f9;
    --mce-color-brown: #f1fa8c;
    --mce-color-black: #282a36;
    --mce-color-white: #f8f8f2;
    --mce-color-bg: #282a36;
    --mce-color-fg: #f8f8f2;
    --mce-color-caret: #f8f8f2;
    --mce-color-select: rgba(153, 153, 255, 0.5);
    --mce-editor-font: 'Jetbrains Mono', monospace;
    --mce-editor-line-height: 1.32;
    --mce-editor-border: 2px groove #f8f8f2;
    --mce-editor-border-focus:  #f8f8f2 0px 1px 4px, #f8f8f2 0px 0px 0px 3px;
}

Support this Project

In this world there are a lot of programming languages, and I can't configure Mini Code Editor for each of them.

If you are interested in contributing to the project, read CONTRIBUTING.md to see how to create or edit programming languages in Mini Code Editor.

Alternatively, you can donate

ko-fi

License

Mini Code Editor
Copyleft (โ†ƒ) 2024 Adrian Bogdan. All wrongs reserved.
License: GPL v3.0

minicodeeditor's People

Contributors

adrbog avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.