acode / copenhagen Goto Github PK
View Code? Open in Web Editor NEWFree, lightweight and hackable open source code editor for the web
License: MIT License
Free, lightweight and hackable open source code editor for the web
License: MIT License
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.
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 '
});
Looks fantastic. I'm going to go ahead and be that guy: VIM mode?
Maybe this exists and I missed it in the docs, but would love to be able to wrap lines with Copenhagen! ๐
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?
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
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:
Can you please help me? (hopefully/most likely im doing something wrong)
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!
Add HTML Autofills in Copenhagen too. Would be helpful for Autocode HTML programmers. Like
โข Syntax Highlight
โข Problem Reporting like VSC
โข Autofills
โข Colorings
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.)
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.