codemirror5 README

The project's README from github.com/codemirror/codemirror5. As one markdown file: README.md.

This repository has moved to https://code.haverbeke.berlin/codemirror/codemirror5

CodeMirror 5

NOTE: CodeMirror 6 exists, and is more mobile-friendly, more accessible, better designed, and much more actively maintained.

CodeMirror is a versatile text editor implemented in JavaScript for the browser. It is specialized for editing code, and comes with over 100 language modes and various addons that implement more advanced editing functionality. Every language comes with fully-featured code and syntax highlighting to help with reading and editing complex code.

A rich programming API and a CSS theming system are available for customizing CodeMirror to fit your application, and extending it with new functionality.

You can find more information (and the manual) on the project page. For questions and discussion, use the discussion forum.

See CONTRIBUTING.md for contributing guidelines.

The CodeMirror community aims to be welcoming to everybody. We use the Contributor Covenant (1.1) as our code of conduct.

Installation

Either get the zip file with the latest version, or make sure you have Node installed and run:

npm install codemirror@5

NOTE: This is the source repository for the library, and not the distribution channel. Cloning it is not the recommended way to install the library, and will in fact not work unless you also run the build step.

Quickstart

To build the project, make sure you have Node.js installed (at least version 6) and then npm install. To run, just open index.html in your browser (you don't need to run a webserver). Run the tests with npm test.

codemirror5 (codemirror/codemirror5)

Searching Database…

27.2K ·GitHub
archived
这是什么?CodeMirror 5 是一个用 JavaScript 编写、运行在浏览器中的代码编辑器,专为编辑代码而设计,支持语法高亮,并提供丰富的 API。本仓库是旧版 5,现已归档,推荐改用 CodeMirror 6。
这是独立应用,还是我可以嵌入自己网页的库?这是一个 JavaScript 库,可以嵌入到网页中使用。它提供编程 API 和 CSS 主题系统,而不是一个独立应用。
我该怎么把它添加到我的项目里?通过 npm 安装:运行 'npm install codemirror@5',或者下载最新发布版本的 zip 压缩包。如果直接克隆源码仓库,不运行构建步骤是无法使用的。
我真的应该在新项目里用它吗?不建议。本仓库已迁移或归档,README 本身推荐改用 CodeMirror 6,称其更适合移动端、更易访问、设计更好,并且维护更积极。
还有谁需要用这个版本,而不是 CodeMirror 6?主要是维护已基于 CodeMirror 5 构建的现有项目的开发者,或者需要使用其中某个尚未移植的 100 多个旧版语言模式或插件的人。
不用服务器,在浏览器里也能用吗?可以。它完全在客户端的浏览器中运行。要体验快速入门,直接在本地打开 index.html 即可,无需运行 Web 服务器。
开箱即用支持多少种语言模式?CodeMirror 5 自带 100 多种语言模式,并包含多种插件,用于代码折叠、自动补全等高级编辑功能。
我可以自定义编辑器的外观吗?可以。它提供 CSS 主题系统和丰富的编程 API,你可以对其进行样式设置和扩展,以适配你的应用。
我该怎么运行测试套件?先用 npm 安装依赖,然后运行 'npm test' 即可执行项目的测试套件。
这个仓库为什么被归档了?维护者已将开发工作转移到 CodeMirror 6,他们认为它更适合移动端、更易访问且维护更积极,因此版本 5 仅保留用于旧版使用。
What are similar projects?ace, editor.md, draft-js, jsoneditor, pell, trix, tui.editor, Sortable
Creator
codemirror
Size
19.1 MB
Stars
27.2K
Age
15y
Commits · 90 Days