New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@granite-elements/ace-widget

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@granite-elements/ace-widget

LostInBrittany's Ace (http://ace.c9.io/) widget

  • 2.2.7-b1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
190
increased by216.67%
Maintainers
1
Weekly downloads
 
Created
Source

Published on Vaadin  Directory Stars on vaadin.com/directory Published on webcomponents.org

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

  1. Fork the ace-widget repository and clone it locally.

  2. Make sure you have npm and the Polymer CLI installed.

  3. When in the ace-widget directory, run npm install to install dependencies.

  4. Serve the project using Polyumer CLI:

    polymer serve --npm

  5. Open the demo in the browser

Attributes

AttributeTypeDefaultDescription
themeString``Editor#setTheme at Ace API
modeString``EditSession#setMode at Ace API
font-sizeString``Editor#setFontSize at Ace API
softtabsBoolean``EditSession#setUseSoftTabs() at Ace API
tab-sizeBoolean``Session#setTabSize() at Ace API
readonlyBoolean``Editor#setReadOnly() at Ace API
wrapBoolean``Session#setWrapMode() at Ace API
autoCompleteObject``Callback for langTools.addCompleter like the example at Ace API
minlinesNumber15Editor.setOptions({minlines: minlines})
maxlinesNumber30Editor.setOptions({minlines: maxlines})
initialFocusBoolean``If true, Editor.focus() is called upon initialisation
placeholderString``A placeholder text to show when the editor is empty

Properties

NameDescription
editorAce editor object.
valueeditor.get-/setValue()

Events

NameDescription
editor-contentTriggered when editor content gets changed
editor-readyTriggered once Ace editor instance is created.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT License

Keywords

FAQs

Package last updated on 30 Aug 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc