Code Monkey home page Code Monkey logo

lit-ace's Introduction

Published on NPM Downloads License FOSSA Status CodeFactor

lit-ace

Even more embeddable and lightweight code editor Custom Element - just one tag, and no JS needed to provide Ace - The High Performance Code Editor

Important Notice

This webcomponent has been built to fit and serve the needs of the Vaadin Add-on Ace (which I created and actively maintain). When using this webcomponent in any other environment, please be carefull because it only has been tested in a Vaadin Add-on environment.

Some methods just don't make sense when using in an non Vaadin environment as most functions depend on JSON input which I create in the Java/Vaadin backend.

Usage example

  <lit-ace theme="terminal" mode="javascript" value="console.log('Have a great day :)')">
  </lit-ace>

Install

Install the component using npm:

$ npm i @f0rce/lit-ace --save

Once installed, import it in your application:

import "@f0rce/lit-ace/lit-ace.js";

License

MIT License

FOSSA Status

lit-ace's People

Contributors

f0rce avatar fossabot avatar jcgueriaud1 avatar

Stargazers

 avatar  avatar  avatar  avatar

lit-ace's Issues

Bump the lit version to lit@2

Vaadin 23 is using [email protected] instead of lit-html / lit-element.

Is it possible to bump lit version of the component for Vaadin 23? It will help to reduce the bundle size (only one lit version) and also the stability of the build.

Normally you only have to change:

  • the package.json (remove lit-element and add lit)
    "lit": "ห†2.1.0",

  • and the import in lit-ace

import { LitElement, html, css } from "lit-element";

to

import { LitElement, html, css } from "lit";

Thanks

Unable to load ace-builds folder

Hello, first of all super nice component, also I'm not a very experienced front-end developer, so I could just be doing something wrong.

Describe the bug
When I'm installing the component in my OpenWC typescript project I'm unable to resolve ace-builds folder.

To Reproduce
Steps to reproduce the behavior:

  1. Create a OpenWC typescript application
  2. Create lit-ace element
  3. Error loading theme and mode.

Expected behavior
I would expect the theme and mode to resolve to node_modules/@f0rce/ace-builds. Instead it tries to find ace-builds in the root of the project (see screenshot).

I can work around the issue copying the ace-builds folder to the root of my project.

Screenshots

Error:
Screenshot 2022-08-02 at 00 30 27
ace.js:883:
Screenshot 2022-08-02 at 00 36 32

Desktop (please complete the following information):

  • OS: MacOS 12.6
  • Browser: chrome

Thx in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.