# vue-codeditor

> Multi-language vue js code editor component running on the browser.

Latest version **1.0.5** (published 2021-01-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-codeditor
pnpm add vue-codeditor
yarn add vue-codeditor
bun add vue-codeditor
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2021-01-13 |
| First published | 2020-11-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Omer Celik |
| Maintainers | oclk |
| Keywords | vue js, brace, ace, code editor, browserify, browser |

## Links

- npm: https://www.npmjs.com/package/vue-codeditor
- Repository: https://github.com/oclk/vue-codeditor
- Homepage: https://github.com/oclk/vue-codeditor#readme
- Issues: https://github.com/oclk/vue-codeditor/issues
- npm.io page: https://npm.io/package/vue-codeditor

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^2.6.11
- [brace](https://npm.io/package/brace.md) ^0.11.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2021-01-13
- 1.0.4 — 2021-01-09
- 1.0.3 — 2020-11-21
- 1.0.2 — 2020-11-20
- 1.0.1 — 2020-11-20
- 1.0.0 — 2020-11-20

## README

# vue-codeditor

Multi-language vue js code editor component running on the browser.

### Project setup
```
npm install vue-codeditor
```

### Usage
##### Import vue-codeditor component
```javascript
// main.js

import Vue from "vue"
import App from "./App.vue"
import vueCodeditor from "vue-codeditor";

Vue.component(vueCodeditor)
```
##### Usage in other components
```html
<!-- App.vue -->

<template>
  <div id="app">
    <!-- 
        * Can be used in the loop (for multiple editor components)
        * Each component must have its own content value.
    -->
    <vue-codeditor v-model="content" mode="javascript" theme="chrome" />

    <!-- 
        * If you want it to be readonly, you should use "readonly='true'" directly!
    -->
    <vue-codeditor v-model="content2" mode="html" theme="monokai" readonly="true"/>
  </div>
</template>

<script>
export default {
  name: "App",
  data() {
    return {
      content: "console.log('Hello world!')",
      content2: "<h1>Hello world!</h1>",
    };
  },
};
</script>
```
#### Available Props

| Prop| Default | Type | Description |
| :---: | :---: | :---: | :---:|
| ```mode``` | javascript | String | optional - [ace mode(s)](https://github.com/ajaxorg/ace/tree/master/lib/ace/mode) |
| ```theme``` | chrome | String | optional - [ace theme(s)](https://github.com/ajaxorg/ace/tree/master/lib/ace/theme) |
| ```readonly``` | false | Boolean | optional |

#### License
[MIT](https://choosealicense.com/licenses/mit/)

Copyright (c) 2020-present, Ömer Çelik

---
_Source: https://npm.io/package/vue-codeditor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
