ace-widget
Polymer wrap around Ace editor
ace-widget
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.
Polymer 3.x. element The legacy Polymer 2.x version is available here
Doc and demo
https://lostinbrittany.github.io/ace-widget/
Usage example
<ace-widget placeholder="Write something... Anything..." initial-focus>
</ace-widget>
Install
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';
Running demos and tests in browser
Fork the
ace-widget
repository and clone it locally.Make sure you have npm and the Polymer CLI installed.
When in the
ace-widget
directory, runnpm install
to install dependencies.Serve the project using Polyumer CLI:
polymer serve --npm
Open the demo in the browser
Attributes
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 |
Properties
Name | Description |
---|---|
editor |
Ace editor object. |
value |
editor.get-/setValue() |
Events
Name | Description |
---|---|
editor-content |
Triggered when editor content gets changed |
editor-ready |
Triggered once Ace editor instance is created. |
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
License
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
Dependencies
- polymer#Polymer/polymer#^1.5.0
- ace-builds#~1.2.0
- Released
- 2017-01-30
- Maturity
- IMPORTED
- License
- MIT License
Compatibility
- Framework
- Polymer 1.0+
- Polymer 2.0+ in 1.3.0
- Polymer 3.0+ in 2.0.0
- Browser
- Browser Independent
ace-widget - Vaadin Add-on Directory
Polymer wrap around Ace editorDocumentation
GitHub Homepage
View on NPM
Issue tracker
License
View on GitHub
ace-widget version 0.1.0
### Dependencies
* polymer#Polymer/polymer#~1.2.0
* ace-builds#~1.2.0
ace-widget version 1.0.0
### Dependencies
* polymer#Polymer/polymer#~1.2.0
* ace-builds#~1.2.0
ace-widget version 1.0.1
### Dependencies
* polymer#Polymer/polymer#~1.2.0
* ace-builds#~1.2.0
ace-widget version 1.0.2
### Dependencies
* polymer#Polymer/polymer#~1.2.0
* ace-builds#~1.2.0
ace-widget version 1.0.3
### Dependencies
* polymer#Polymer/polymer#~1.2.0
* ace-builds#~1.2.0
ace-widget version 1.0.4
### Dependencies
* polymer#Polymer/polymer#~1.2.0
* ace-builds#~1.2.0
ace-widget version 1.0.5
### Dependencies
* polymer#Polymer/polymer#~1.2.0
* ace-builds#~1.2.0
ace-widget version 1.0.6
### Dependencies
* polymer#Polymer/polymer#~1.2.0
* ace-builds#~1.2.0
ace-widget version 1.0.7
### Dependencies
* polymer#Polymer/polymer#~1.2.0
* ace-builds#~1.2.0
ace-widget version 1.0.8
### Dependencies
* polymer#Polymer/polymer#~1.2.0
* ace-builds#~1.2.0
ace-widget version 1.0.9
### Dependencies
* polymer#Polymer/polymer#~1.2.0
* ace-builds#~1.2.0
ace-widget version 1.0.10
### Dependencies
* polymer#Polymer/polymer#~1.2.0
* ace-builds#~1.2.0
ace-widget version 1.0.11
### Dependencies
* polymer#Polymer/polymer#~1.2.0
* ace-builds#~1.2.0
ace-widget version 1.0.12
### Dependencies
* polymer#Polymer/polymer#~1.5.0
* ace-builds#~1.2.0
ace-widget version 1.0.13
### Dependencies
* polymer#Polymer/polymer#~1.5.0
* ace-builds#~1.2.0
ace-widget version 1.0.14
### Dependencies
* polymer#Polymer/polymer#^1.5.0
* ace-builds#~1.2.0
ace-widget version 1.1.0
### Dependencies
* polymer#Polymer/polymer#^1.5.0
* ace-builds#~1.2.0
ace-widget version 1.2.0
### Dependencies
* polymer#Polymer/polymer#^1.5.0
* ace-builds#~1.2.0
ace-widget version 1.2.1
### Dependencies
* polymer#Polymer/polymer#^1.5.0
* ace-builds#~1.2.0
ace-widget version 1.2.2
### Dependencies
* polymer#Polymer/polymer#^1.5.0
* ace-builds#~1.2.0
ace-widget version 1.2.3
### Dependencies
* polymer#Polymer/polymer#^1.5.0
* ace-builds#~1.2.0
ace-widget version 1.2.4
### Dependencies
* polymer#Polymer/polymer#^1.5.0
* ace-builds#~1.2.0
ace-widget version 1.2.5
### Dependencies
* polymer#Polymer/polymer#^1.5.0
* ace-builds#~1.2.0
ace-widget version 1.3.0
### Dependencies
* polymer#Polymer/polymer#1.9 - 2
* ace-builds#~1.2.0
ace-widget version 1.3.1
### Dependencies
* polymer#Polymer/polymer#1.9 - 2
* ace-builds#~1.2.0
ace-widget version 1.3.2
### Dependencies
* polymer#Polymer/polymer#1.9 - 2
* ace-builds#~1.2.0
ace-widget version 1.3.3
### Dependencies
* polymer#Polymer/polymer#1.9 - 2
* ace-builds#~1.2.0
ace-widget version 1.3.4
### Dependencies
* polymer#Polymer/polymer#1.9 - 2
* ace-builds#~1.2.0
ace-widget version 1.3.5
### Dependencies
* polymer#Polymer/polymer#1.9 - 2
* ace-builds#~1.2.0
ace-widget version 1.3.6
### Dependencies
* polymer#Polymer/polymer#1.9 - 2
* ace-builds#~1.2.0
ace-widget version 1.3.7
### Dependencies
* polymer#Polymer/polymer#1.9 - 2
* ace-builds#~1.2.0
ace-widget version 1.3.8
### Dependencies
* polymer#Polymer/polymer#1.9 - 2
* ace-builds#~1.2.0
ace-widget version 2.0.0
### Dependencies
* @polymer/polymer#^3.0.0
* ace-builds#^1.3.3
ace-widget version 2.0.1
### Dependencies
* @polymer/polymer#^3.0.0
* ace-builds#^1.3.3
ace-widget version 2.0.2
### Dependencies
* @polymer/polymer#^3.0.0
* ace-builds#^1.3.3
ace-widget version 2.0.3
### Dependencies
* @polymer/polymer#^3.0.0
* ace-builds#^1.3.3
ace-widget version 2.0.4
### Dependencies
* @polymer/polymer#^3.0.0
* ace-builds#^1.3.3
ace-widget version 2.1.0
### Dependencies
* @polymer/polymer#^3.0.0
* ace-builds#^1.3.3
ace-widget version 2.2.5
### Dependencies
* @polymer/polymer#^3.0.0
* ace-builds#^1.4.0
ace-widget version 2.2.6
### Dependencies
* @polymer/polymer#^3.0.0
* ace-builds#^1.4.0
ace-widget version 2.2.7-b1
### Dependencies
* @polymer/polymer#^3.0.0
* ace-builds#^1.4.0