{"id":13399437,"url":"https://github.com/ajaxorg/ace","last_synced_at":"2025-05-12T18:01:33.485Z","repository":{"id":37467690,"uuid":"1028340","full_name":"ajaxorg/ace","owner":"ajaxorg","description":"Ace (Ajax.org Cloud9 Editor)","archived":false,"fork":false,"pushed_at":"2025-05-04T21:04:57.000Z","size":44308,"stargazers_count":26934,"open_issues_count":133,"forks_count":5298,"subscribers_count":605,"default_branch":"master","last_synced_at":"2025-05-05T15:19:35.868Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://ace.c9.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ajaxorg.png","metadata":{"files":{"readme":"Readme.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2010-10-27T10:43:36.000Z","updated_at":"2025-05-05T08:51:13.000Z","dependencies_parsed_at":"2024-01-29T10:04:16.504Z","dependency_job_id":"91db4739-5815-4d46-9ba2-40a3ef45a60f","html_url":"https://github.com/ajaxorg/ace","commit_stats":{"total_commits":6944,"total_committers":591,"mean_commits":"11.749576988155669","dds":0.667770737327189,"last_synced_commit":"a3277eaef554bdf6393e3957d60f5420e1d7130f"},"previous_names":[],"tags_count":159,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajaxorg%2Face","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajaxorg%2Face/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajaxorg%2Face/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajaxorg%2Face/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajaxorg","download_url":"https://codeload.github.com/ajaxorg/ace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253794180,"owners_count":21965479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T19:00:37.829Z","updated_at":"2025-05-12T18:01:33.398Z","avatar_url":"https://github.com/ajaxorg.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Browser editor","DevTools","Editors","Embeddable editors (standalone widgets)","Framework or Library","Editor","others","编辑器","Editors [🔝](#readme)","14. 代码高亮插件/代码编辑器 ##","Repository","JavaScript Libs","14. 代码高亮插件/代码编辑器"],"sub_categories":["Languages","Runner","Inline Editor","Flip","网络服务_其他","13.20 视差滚动(Parallax Scrolling) ###","Editor","运行器","13.20 视差滚动(Parallax Scrolling)","运行器e2e测试"],"readme":"Ace (Ajax.org Cloud9 Editor)\n============================\n\n[![Build Status](https://github.com/ajaxorg/ace/workflows/CI/badge.svg)](https://github.com/ajaxorg/ace/actions) \n[![npm](https://img.shields.io/npm/v/ace-builds.svg)](https://www.npmjs.com/package/ace-builds)\n\n_Note_: The new site at http://ace.c9.io contains all the info below along with an embedding guide and all the other resources you need to get started with Ace.\n\nAce is a standalone code editor written in JavaScript. Our goal is to create a browser based editor that matches and extends the features, usability and performance of existing native editors such as TextMate, Vim or Eclipse. It can be easily embedded in any web page or JavaScript application. Ace is developed as the primary editor for [Cloud9 IDE](https://c9.io/) and the successor of the Mozilla Skywriter (Bespin) Project.\n\nFeatures\n--------\n\n* Syntax highlighting for over 120 languages (TextMate/Sublime/_.tmlanguage_ files can be imported)\n* Over 20 themes (TextMate/Sublime/_.tmtheme_ files can be imported)\n* Automatic indent and outdent\n* An optional command line\n* Handles huge documents (at last check, 4,000,000 lines is the upper limit)\n* Fully customizable key bindings including vim and Emacs modes\n* Search and replace with regular expressions\n* Highlight matching parentheses\n* Toggle between soft tabs and real tabs\n* Displays hidden characters\n* Drag and drop text using the mouse\n* Line wrapping\n* Code folding\n* Multiple cursors and selections\n* Live syntax checker (currently JavaScript/CoffeeScript/CSS/XQuery)\n* Cut, copy, and paste functionality\n\nTake Ace for a spin!\n--------------------\n\nCheck out the Ace live [demo](http://ace.c9.io/build/kitchen-sink.html) or get a [Cloud9 IDE account](https://c9.io/) to experience Ace while editing one of your own GitHub projects.\n\nIf you want, you can use Ace as a textarea replacement thanks to the [Ace Bookmarklet](http://ajaxorg.github.io/ace/build/demo/bookmarklet/index.html).\n\nEmbedding Ace\n-------------\n\nAce can be easily embedded into any existing web page. You can either use one of pre-packaged versions of [ace](https://github.com/ajaxorg/ace-builds/) (just copy one of `src*` subdirectories somewhere into your project), or use requireJS to load contents of [lib/ace](https://github.com/ajaxorg/ace/tree/master/lib/ace) as `ace`\n\n\nThe easiest version is simply:\n\n```html\n\u003cdiv id=\"editor\"\u003esome text\u003c/div\u003e\n\u003cscript src=\"src/ace.js\" type=\"text/javascript\" charset=\"utf-8\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    var editor = ace.edit(\"editor\");\n\u003c/script\u003e\n```\n*Exploring configuration options [Configuring-Ace](https://github.com/ajaxorg/ace/wiki/Configuring-Ace/)*\n\nWith \"editor\" being the id of the DOM element, which should be converted to an editor. Note that this element must be explicitly sized and positioned `absolute` or `relative` for Ace to work. e.g.\n\n```css\n#editor {\n    position: absolute;\n    width: 500px;\n    height: 400px;\n}\n```\n\nTo change the theme simply include the Theme's JavaScript file\n\n```html\n\u003cscript src=\"src/theme-twilight.js\" type=\"text/javascript\" charset=\"utf-8\"\u003e\u003c/script\u003e\n```\n\nand configure the editor to use the theme:\n\n```javascript\neditor.setTheme(\"ace/theme/twilight\");\n```\n\nBy default the editor only supports plain text mode; many other languages are available as separate modules. After including the mode's JavaScript file:\n\n```html\n\u003cscript src=\"src/mode-javascript.js\" type=\"text/javascript\" charset=\"utf-8\"\u003e\u003c/script\u003e\n```\n\nThe mode can then be used like this:\n\n```javascript\nvar JavaScriptMode = ace.require(\"ace/mode/javascript\").Mode;\neditor.session.setMode(new JavaScriptMode());\n```\n\nto destroy editor use\n\n```javascript\neditor.destroy();\neditor.container.remove();\n```\n\n\nDocumentation\n-------------\n\nAdditional usage information, including events to listen to and extending syntax highlighters, can be found [on the main Ace website](http://ace.c9.io).\n\nYou can also find API documentation at [https://ajaxorg.github.io/ace-api-docs/](https://ajaxorg.github.io/ace-api-docs/).\n\nAlso check out the sample code for the kitchen sink [demo app](https://github.com/ajaxorg/ace/blob/master/demo/kitchen-sink/demo.js).\n\nIf you still need help, feel free to ask a question on our [discussions page](https://github.com/ajaxorg/ace/discussions).\n\nRunning Ace\n-----------\n\nAfter the checkout Ace works out of the box. No build step is required. To try it out, simply start the bundled mini HTTP server using Node.JS\n\n```bash\nnode ./static.js\n```\n\nThe editor can then be opened at http://localhost:8888/kitchen-sink.html. \n\nTo open the editor with a file:/// URL see [the wiki](https://github.com/ajaxorg/ace/wiki/Running-Ace-from-file).\n\nBuilding Ace\n-----------\n\nYou do not generally need to build ACE. The [ace-builds repository](https://github.com/ajaxorg/ace-builds/) endeavours to maintain the latest build, and you can just copy one of _src*_ subdirectories somewhere into your project.\n\nHowever, all you need is Node.js and npm installed to package ACE. Just run `npm install` in the ace folder to install dependencies:\n\n```bash\nnpm install\nnode ./Makefile.dryice.js\n```\n\nTo package Ace, we use the dryice build tool developed by the Mozilla Skywriter team. Call `node Makefile.dryice.js` on the command-line to start the packing. This build script accepts the following options\n\n```bash\n-m                 minify build files with uglify-js          \n-nc                namespace require and define calls with \"ace\"\n-bm                builds the bookmarklet version\n--target ./path    specify relative path for output folder (default value is \"./build\")\n```\n\nTo generate all the files in the ace-builds repository, run `node Makefile.dryice.js full --target ../ace-builds`\n\nRunning the Unit Tests\n----------------------\n\nThe Ace unit tests can run on node.js. Assuming you have already done `npm install`, just call:\n\n```bash\nnpm run test\n```\n\nYou can also run the tests in your browser by serving:\n\n    http://localhost:8888/src/test/tests.html\n\nThis makes debugging failing tests much easier.\n\nContributing\n-----------------------------\n\nAce is a community project and wouldn't be what it is without contributions! We actively encourage and support contributions. The Ace source code is released under the BSD License. This license is very simple, and is friendly to all kinds of projects, whether open source or not. Take charge of your editor and add your favorite language highlighting and keybindings!\n\nFeel free to fork and improve/enhance Ace any way you want. If you feel that the editor or the Ace community will benefit from your changes, please open a pull request. For more information on our contributing guidelines, see [CONTRIBUTING.md](https://github.com/ajaxorg/ace/blob/master/CONTRIBUTING.md).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajaxorg%2Face","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajaxorg%2Face","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajaxorg%2Face/lists"}