Giter VIP home page Giter VIP logo

copenhagen's People

Contributors

keithwhor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

copenhagen's Issues

Error on Save: `Invalid User Action: ResetCursor`

Uncaught Error: Invalid user action: "ResetCursor"
    at i._userAction (copenhagen.0-1-4.min.js:1)
    at i.userAction (copenhagen.0-1-4.min.js:1)
    at i.setValue (copenhagen.0-1-4.min.js:1)
    at i.save (copenhagen.0-1-4.min.js:1)
    at i.ctrl+s (copenhagen.0-1-4.min.js:1)
    at i.shortcut (copenhagen.0-1-4.min.js:1)
    at i.keydown (copenhagen.0-1-4.min.js:1)
    at i.<anonymous> (copenhagen.0-1-4.min.js:1)
    at HTMLTextAreaElement.<anonymous> (copenhagen.0-1-4.min.js:1)

The editor throws the above error after pressing Command + S.

See example here.

What to return at addComplete function

When using addAutocomplete the editors seems to break something. I have tried to follow the documentation and even seek the Copenhagen code to find out how to use add extra AutoComplete. May yout give me a clue on how to use this feature

            const ed = new Copenhagen.Editor({ language: 'javascript' });

            // open, but do not auto-focus the editor
            ed.open(editor.value, false);

            // set a value
            ed.setValue('var message = `hello world`;');

            ed.addAutocomplete('sel', function (editor, selection, inString, inComment) {
                console.log(editor, selection, inString, inComment);
                 return 'some value '
            });

VIM keybindings

Looks fantastic. I'm going to go ahead and be that guy: VIM mode?

Feature request: SQL support

Right now only "javascript", "json", "markdown", "html", "css" and "text" are supported. Would be great to have others languages disponible.

Can I implement some language by myself. How can I help with it? I would like to give it a try by adding SQL and CyPher . Is there some instructions to add another language?

Svelte usage

First of all want to say that Copenhagen looks and feels great! Thanks!

Im trying to use it in Svelte but facing small issue

In general I can init the editor and see it on the page. The problem is that the text is not visible for some reason

image

Found out that the text is there but its too far on the right and thats the reason why is not visible. If I disable width: 10000px in the css then the text is visible:

image

Can you please help me? (hopefully/most likely im doing something wrong)

Distribute as an npm package

Hey! First of all thanks for open-sourcing the Copenhagen editor, the web was in need of a lightweight alternative to Monaco and Copenhaguen just works great!

I believe that a much needed step in making this more accessible is to package the code as an npm package, so that it is easier to consume as a dependency. Publishing to npm will also automatically publish it to CDN serivces like skypack for importing with <script src="..."> directly. This would make the editor easier to get started with and I think would enhance the dev experience.

My use case is using it inside a Vue.js SPA. Is bundling as a npm package planned? Would there be interest in doing so? Thanks!

Enchantment: Html support

Add HTML Autofills in Copenhagen too. Would be helpful for Autocode HTML programmers. Like
โ€ข Syntax Highlight
โ€ข Problem Reporting like VSC
โ€ข Autofills
โ€ข Colorings

Editor inserts "Control" and "Alt" strings when you press those keys on Firefox

Tested on Firefox 86 Linux. Problem doesn't occur for me in Chrome.

A similar problem occurs when I try to do composition, in which case it keeps inserting "Process" instead. That problem does occur on Chrome, but there it inserts "Unidentified".

(Congrats on getting the overlaid-textarea approach to work so well. This looks a lot more solid than similar projects I've seen before.)

AltGraphic and OS key are displayed when typing inside editor

Hey !

Lovely project going on here. I've however stumbled accross a quite problematic issue : when I'm typing, if I hit AltGraphic (used a lot on french keyboard) or my OS key, Copenhagen Editor writes "AltGraph" and "OS" which makes the editor pretty much unuasble.

I'm on debian buster with firefox 78.8

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.