百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

react-ace

> 前端框架
开源

React Ace 组件

4.2K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

React Ace 组件

React - Ace # # # React - Ace

一组用于 Ace 的 React 组件 版本 8 说明!: 我们已经停止对 Brace 的支持,现在使用 Ace-builds。请阅读有关迁移的文档。示例正在更新中。

安装

npm install React-ace ace-builds yarn add React-ace ace-builds

基本用法

javascript
import React from "react";
import { render } from "react-dom";
import AceEditor from "react-ace";

import "ace-builds/src-noconflict/mode-java";
import "ace-builds/src-noconflict/theme-github";
import "ace-builds/src-noconflict/ext-language_tools";

function onChange(newValue) {
  console.log("change", newValue);
}

// Render editor
render(
  <AceEditor
    mode="java"
    theme="github"
    onChange={onChange}
    name="UNIQUE_ID_OF_DIV"
    editorProps={{ $blockScrolling: true }}
  />,
  document.getElementById("example")
);

示例

请查看 example 目录,其中包含使用 webpack 的一个示例。

文档

□后卫 请通过每月捐款支持我们,帮助我们继续开展活动。[成为支持者] <a href="https://opencollective.com/react-

DEMO of React Ace DEMO of React Ace Split Editor DEMO of React Ace Diff Editor Ace Editor Split View Editor Diff Editor How to add modes, themes and keyboard handlers Frequently Asked Questions Migrate to version 8

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScriptacecode-editorhacktoberfestjavascript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架