Giter Site home page Giter Site logo

hbitmp / m-monaco-editor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mengdu/m-monaco-editor

0.0 1.0 0.0 546 KB

A monaco-editor component for vue.(基于cdn版本)

Home Page: https://mengdu.github.io/m-monaco-editor/example/

License: MIT License

JavaScript 86.54% HTML 4.19% Vue 9.27%

m-monaco-editor's Introduction

m-monaco-editor

A monaco-editor component for vue.

npm

npm install -S vue-m-monaco-editor

use

import MMonacoEditor from 'vue-m-monaco-editor'

Vue.use(MMonacoEditor) // 注册 m-monaco-editor 组件
<m-monaco-editor v-model="code" :mode="mode" :theme="theme"></m-monaco-editor>

MMonacoEditor Attributes

参数 说明 类型 可选值 默认值
value 内容 string
theme 主题 string vs/vs-dark/hc-dark vs
mode 语言类型 string languages
cdnUrl monaco-editor文件链接 string https://cdn.bootcss.com/monaco-editor/0.13.1/min/vs
requireConfig monaco-editor loader.js 配置 object
syncInput 同步内容到value boolean true/false false
readOnly 仅读 boolean true/false false
fontSize 字体大小 number
renderLineHighlight 高亮当前行 string "none" "gutter"

如果是内网的项目,请指定 cdnUrl 到内网可以访问的 monaco-editor 目录。

MMonacoEditor Event

参数 说明 参数
init 初始化 editer,editorDom,monaco
blur 失去焦点
focus 获取焦点
layout-change 布局改变

更多配置信息,可以在init事件后使用 monaco-editor api

Other

monaco-editor

monaco-editor docs

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.