
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
@granite-elements/ace-widget
Advanced tools
LostInBrittany's Ace (http://ace.c9.io/) widget - Modern Lit implementation
Even more embeddable code editor Custom Element - just one tag, and no JS needed to provide Ace - The High Performance Code Editor
Originally based on pjako's fork of PolymerLabs ace-element.
Modern implementation using Lit 3.1
The legacy Polymer implementation is still available as
ace-widget-old.js
https://lostinbrittany.github.io/ace-widget/
<script type="module" src="@granite-elements/ace-widget/ace-widget.js"></script>
<ace-widget placeholder="Write something... Anything..." initial-focus>
</ace-widget>
Install the component using npm:
$ npm i @granite-elements/ace-widget --save
Once installed, import it in your application:
import '@granite-elements/ace-widget/ace-widget.js';
Fork the ace-widget repository and clone it locally.
Make sure you have npm installed.
When in the ace-widget directory, run npm install to install dependencies.
Serve the project using the development server:
npm start
This will automatically open the demo page in your default browser.
A simplified test page is also available at /demo/simple.html. This page contains a minimal setup with just one editor instance and controls for toggling debug features. It's useful for quick testing and debugging.
| Attribute | Type | Default | Description |
|---|---|---|---|
theme | String | `` | Editor#setTheme at Ace API |
mode | String | `` | EditSession#setMode at Ace API |
font-size | String | `` | Editor#setFontSize at Ace API |
softtabs | Boolean | `` | EditSession#setUseSoftTabs() at Ace API |
tab-size | Boolean | `` | Session#setTabSize() at Ace API |
readonly | Boolean | `` | Editor#setReadOnly() at Ace API |
wrap | Boolean | `` | Session#setWrapMode() at Ace API |
autoComplete | Object | `` | Callback for langTools.addCompleter like the example at Ace API |
minlines | Number | 15 | Editor.setOptions({minlines: minlines}) |
maxlines | Number | 30 | Editor.setOptions({minlines: maxlines}) |
initialFocus | Boolean | `` | If true, Editor.focus() is called upon initialisation |
placeholder | String | `` | A placeholder text to show when the editor is empty |
verbose | Boolean | false | If true, outputs basic debug information to the console |
debug | Boolean | false | If true, outputs detailed debug information to the console |
disableWorker | Boolean | false | If true, disables Ace editor worker scripts (useful for environments where workers don't work) |
| Name | Description |
|---|---|
editor | Ace editor object. |
value | editor.get-/setValue() |
| Name | Description |
|---|---|
editor-content | Triggered when editor content gets changed |
editor-ready | Triggered once Ace editor instance is created. |
git checkout -b my-new-featuregit commit -m 'Add some feature'git push origin my-new-featureThis component is built with Lit 3.1, a modern, lightweight web component library. It provides a clean, efficient wrapper around the Ace editor with reactive properties and a simple API.
FAQs
LostInBrittany's Ace (http://ace.c9.io/) widget - Modern Lit implementation
We found that @granite-elements/ace-widget demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.