# code_editor **Repository Path**: helloyilia/code_editor ## Basic Information - **Project Name**: code_editor - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-01-05 - **Last Updated**: 2022-01-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # CodeEditor [![npm package](https://img.shields.io/npm/v/x-data-spreadsheet.svg)](https://www.npmjs.org/package/x-data-spreadsheet) [![NPM downloads](http://img.shields.io/npm/dm/x-data-spreadsheet.svg)](https://npmjs.org/package/x-data-spreadsheet) [![NPM downloads](http://img.shields.io/npm/dt/x-data-spreadsheet.svg)](https://npmjs.org/package/x-data-spreadsheet) [![Build passing](https://travis-ci.org/myliang/x-spreadsheet.svg?branch=master)](https://travis-ci.org/myliang/x-spreadsheet) [![codecov](https://codecov.io/gh/myliang/x-spreadsheet/branch/master/graph/badge.svg)](https://codecov.io/gh/myliang/x-spreadsheet) ![GitHub](https://img.shields.io/github/license/myliang/x-spreadsheet.svg) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/myliang/x-spreadsheet.svg) [![Join the chat at https://gitter.im/x-datav/spreadsheet](https://badges.gitter.im/x-datav/spreadsheet.svg)](https://gitter.im/x-datav/spreadsheet?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) > Create a custom web editor using Typescript, React, ANTLR and Monaco-Editor > This is a web editor for a custom language. ## CDN ```html ``` ## NPM ```shell npm install CodeEditor ``` ```javascript ``` ## Internationalization ```tsx import * as React from 'react'; import * as ReactDOM from 'react-dom'; import {CodeEditor} from './CodeEditor'; const style = { width:'300', height:'300' } const props = { value: 'hhhhhhhhhhh', theme: "vs-dark" } ReactDOM.render(, document.getElementById('container')); ``` ```html TodoLang Editor
``` ## Features - ## Development ```sheel // git clone https://github.com/myliang/x-spreadsheet.git cd CodeEditor npm install npm run dev ``` Open your browser and visit http://127.0.0.1:8080. ## Browser Support Modern browsers(chrome, firefox, Safari). ## LICENSE MIT ## 发布到NPM私服 NPM私服地址:http://10.10.247.1:4873/ 查看NPM服务器设置: ```sheel npm config get registry ``` 修改NPM服务器: ```sheel npm config set registry http://10.10.247.1:4873/ ``` 查看当前用户: ```sheel npm whoami ``` 登录: ```sheel npm login ``` 发布: ```sheel npm publish ``` 添加用户: ```sheel npm adduser --registry http://10.10.247.1:4873 ``` 设置密码: ```sheel npm profile set password --registry http://10.10.247.1:4873 ``` 删除已发布的版本: ```sheel npm unpublish @gw/report-x-data-spreadsheet@1.0.47 ``` 使用npm管理版本号: ```sheel npm version [ | major | minor | patch ``` 引用: [Part 1: Build a web editor with syntax colorization](https://medium.com/better-programming/create-a-custom-web-editor-using-typescript-react-antlr-and-monaco-editor-part-1-2f710c69c18c) [Part 2: Implement language services, auto-completion, syntax and semantic validation and auto-formatting](https://medium.com/better-programming/create-a-custom-web-editor-using-typescript-react-antlr-and-monaco-editor-bcfc7554e446) ``` cnpm i -S monaco-editor-core react react-dom ``` Nom ``` cnpm i -D antlr4ts @babel/core @types/react @types/react-dom @types/webpack antlr4ts-cli babel-loader bufferutil clean-webpack-plugin css-loader html-webpack-plugin mini-css-extract-plugin optimize-css-assets-webpack-plugin react-refresh style-loader ts-loader type-fest typescript uglifyjs-webpack-plugin utf-8-validate webpack webpack-bundle-analyzer webpack-cli webpack-dev-server webpack-hot-middleware webpack-merge webpack-plugin-serve ``` antlr4ts