Code Monkey home page Code Monkey logo

aceeditorv14's Introduction

Published on Vaadin  Directory Stars on vaadin.com/directory npm Downloads on npmjs.com

Ace Editor for Vaadin Flow 14

Even more embeddable code editor custom Vaadin widget - Ace - The High Performance Code Editor

Originally based on LostInBrittany's fork of PolymerLabs ace-element

Created by Sergio Alberto Hilerio
Maintained by David "F0rce" Dodlek

Install

Install the component using Vaadin Directory:

<dependency>
   <groupId>com.hilerio</groupId>
   <artifactId>ace-widget</artifactId>
   <version>1.0.2</version>
</dependency>

<repository>
   <id>vaadin-addons</id>
   <url>https://maven.vaadin.com/vaadin-addons</url>
</repository>

Latest Version: v1.0.2

Documentation

docs.f0rce.de/ace

License

MIT License

aceeditorv14's People

Contributors

dependabot[bot] avatar ericfranke1987 avatar f0rce avatar sergio70 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

aceeditorv14's Issues

First click into editor doesn't allow to write

Hello,
in last version of this component we are facing an issue with focus/edit in this editor.

First click seem to only focus on the component but if you write something nothing happens (not even paste from clipboard).
After second click into editor it works correctly.

It looks like the first click only focuses the component but not enters the "edit mode"...

JS

The next step ๐Ÿฅ‡

Dear @Sergio70,

it was a great pleasure working with you. I really want to thank you, for trusting me and letting me contribute as much as I wanted / needed to.

With Polymer 3 / Polymer-Element going end of life pretty soon and Vaadin's full support of Lit-Element (the newest and faster Webcomponent framework) I created a whole new version of the ace editor. With more functions, better lifecyle and so on.

I already told the people, that had problems with the current version ( #58 #56 ), to switch to the newer version to fix their issues, which was a great success.

So from now on, I will be focussing / maintaing the newer / current version of the ace editor:
https://github.com/f0rce/ace <-- Vaadin Add-on source code
https://github.com/f0rce/lit-ace <-- Frontend source code
https://vaadin.com/directory/component/ace <-- Vaadin Directory
https://www.npmjs.com/package/@f0rce/lit-ace <-- Frontend NPM package
https://docs.f0rce.de/ace <-- Documentation

I hope you are doing well in those difficult times and I hope that we will keep in touch.

Have a great day,
David Dodlek

Scrollbar flickering when scrolling

See attached Screen recording. When I try to scroll in the editor using the mouse wheel, the vertical scrollbar flickers in and out. Scrolling by dragging the bar is completely impossible.

The Issue seems to be that the default value for the maxLines is set to an Object containing Infinity

instead of a number. This does not work correctly with the underlying ace editor, since a Number or Falsy value is expected, not an Object.

As a workaround I set the maxLines to 0 manually in our Java-Code (aceEditor.setMaxlines(0);), but I think this should be fixed in general. Im not sure though what the best default value would be here. 0 works for our usecase, but maybe Infinity (without being packed in an object) would also work.

Scrolling

Quality of Life #1

Hello @Sergio70 ,

this issue is just here to inform you, that in today (or in the next few days) I will be uploading a new version of the ace-editor. The last few days I was playing quite a bit with the ace-editor and found some small "issues" regarding visibility and flow. There was also a small mistake in the synchronisation of the current selection which was also fixed.

I think some people will appreciate these changes :)

Stay safe,
David

BlurEvent will probably cause jumping cursor (again)

The BlurEvent listens to the the 'editor-content' Event:


This causes a call from the frontend to the backend every time the content changed (Not on Blur).

Further more a Listener is added to this event which updates the content.

addListener(BlurChanged.class, this::updateText);

Updating the content of the backend content will also cause an update in the frontend. We creating kind of a loop! Exactly this mechanism was causing the original issue #7.
@F0rce have you tested your solution with setting the Network speed to 'slow 3G' or typed really fast?

[Update] v1.0.0

Hello everyone,

the last 3 weeks, I worked really hard on this widget and I'm really proud to say that version v1.0.0 is finally stable and ready to release.

I would like to thank @Sergio70 for trusting me and letting me contribute as much as I did and I really hope to continue my contribution in the future.

I'm going to write a full documentation by the end of the week.

Yours sincerely,
David

Cursor jumps to the end of text

When I type quickly to the editor the cursor jumps at the end of text. It doesn't happen when I write slowly.
It hapens in version 1.4 Beta

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.