emmetio / codemirror Goto Github PK
View Code? Open in Web Editor NEWEmmet plugin for CodeMirror online editor
Home Page: http://emmet.io
Emmet plugin for CodeMirror online editor
Home Page: http://emmet.io
We at VersionEye are working hard to keep up the quality of the bower's registry.
We just finished our initial analysis of the quality of the Bower.io registry:
7530 - registered packages, 224 of them doesnt exists anymore;
We analysed 7306 existing packages and 1070 of them don't have bower.json on the master branch ( that's where a Bower client pulls a data ).
Sadly, your library emmetio/codemirror
is one of them.
Can you spare 15 minutes to help us to make Bower better?
Just add a new file bower.json
and change attributes.
{
"name": "emmetio/codemirror",
"version": "1.0.0",
"main": "path/to/main.css",
"description": "please add it",
"license": "Eclipse",
"ignore": [
".jshintrc",
"**/*.txt"
],
"dependencies": {
"<dependency_name>": "<semantic_version>",
"<dependency_name>": "<Local_folder>",
"<dependency_name>": "<package>"
},
"devDependencies": {
"<test-framework-name>": "<version>"
}
}
Read more about bower.json on the official spefication and nodejs semver library has great examples of proper versioning.
NB! Please validate your bower.json with jsonlint before commiting your updates.
Thank you!
Timo,
twitter: @versioneye
email: [email protected]
VersionEye - no more legacy software!
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
I was just curious to know if there's a way of calling a destruct on codemirror / emmet to have the visual elements disappear and no longer listening for events on the textarea specified?
I don't know if this project is abandoned, but I notice that this plugin use olde javascript style like arguments.callee
Is anybody updating this? If it doesn't please some bod could mark it as abandoned or closed or so..
Thanks
I've replicated the demo that's used on CodeMirror's own site, which uses a minified version of emmet. The demo uses CM2, but we're using CM3 in jsbin.com and emmet.js isn't hooking most of the keys we need - particularly like cmd+e and tab.
Example here: http://jsbin.com/asewiv/3
In Chrome DevTools we just updated to CM4.
We'd be very interested in using this plugin directly inside DevTools if it's compatible.
ref: http://code.google.com/p/chromium/issues/detail?id=360242
cc @aslushnikov
Add 'text/x-styl': 'stylus' to the modeMap editor.js
modeMap: {
'text/html': 'html',
'application/xml': 'xml',
'text/xsl': 'xsl',
'text/css': 'css',
'text/x-less': 'less',
'text/x-scss': 'scss',
'text/x-sass': 'sass',
'text/x-styl': 'stylus'
},
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
As far as I see the only change that has to be done is replace throw CodeMirror.Pass;
with return CodeMirror.Pass;
When I pack the file with webpack,it comes this error:
ERROR in ./src/js/vendors/codemirror/emmet.js
Module build failed: SyntaxError: Octal literal in strict mode (14914:23)
14912 | */
14913 | getImageSize: function(stream) {
> 14914 | var pngMagicNum = "\211PNG\r\n\032\n",
| ^
14915 | jpgMagicNum = "\377\330",
14916 | gifMagicNum = "GIF8",
14917 | pos = 0,
please help me to fix it.
Hello, reading from the docs it seems that this plugin should work on CodeMirror 4.x+, but I can't get it to work with CodeMirror 5.5. Am I doing something wrong or it's just that the plugin doesn't support CodeMirror 5.x?
Thank you.
Is there a way to build emmet.js without lodash being baked right into the file? Like lodash is already available globally so it just uses that?
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/2969098-build-without-lodash?utm_campaign=plugin&utm_content=tracker%2F438327&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F438327&utm_medium=issues&utm_source=github).Hey, this is Oskar from JSFiddle.
We have emmet enabled by default in JSFiddle, and always had the issue that a HTML comment is toggled within the JavaScript panel. Was looking into extending emmet to handle JS comments but can't figure out a good way to do so.
Any tips would be really appreciated.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
http://jsbin.com/vesitil/1/edit?html,output
h1<tab>
but nothing happened.
Request for some docs or demo.
This stackoverflow article didn't help.
this is my demo
require(['jquery', 'codemirror','codemirror/addon/emmet/emmet', 'codemirror/mode/htmlmixed/htmlmixed'], function($, CodeMirror,Emmet) {
var CodeMirrorObj = {
cms: {
htmlCm: null
},
opts: {
htmlOpt: {
lineNumbers: true,
mode: "text/html",
theme: "monokai",
indentUnit: 4,
indentWithTabs: true
}
},
init: function() {
this.cms.htmlCm = Emmet(CodeMirror(document.getElementById("code_html"), CodeMirrorObj.opts.htmlOpt));
}
}
CodeMirrorObj.init();
});
I need your help。
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
table>tr>td>a
produces:
%table
%tr
%td%a{:href => ""}
which isn't quite right (the a should be nested too).
It happens in CodeMirror Emmet, but also in Sublime Text.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/7994689-haml-nesting-issue?utm_campaign=plugin&utm_content=tracker%2F438327&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F438327&utm_medium=issues&utm_source=github).Tested in latest WordPress 4.1, nothing earlier, if I Include emmet.js on any admin page that includes the "add media" dialog it throws several Uncaught TypeError: undefined is not a function...
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
I've successfully initialized the Emmet plugin for CodeMirror using emmetCodeMirror()
, but is there a way to destroy it or stop it from running? What I'm trying to do is create a toggle that switches the plugin on and off. Starting it is easy, but I'm not sure if there's a way to stop it and then start it back up on a click event.
I'm running CodeMirror 5.13.2 if that makes any difference.
ATM the only way to build the plugin without caniuse data is to patch emmet.js
import emmet from 'emmet';
import 'emmet/bundles/snippets';
// -- commented out
//import 'emmet/bundles/caniuse';
export default emmet;
Caniuse data is quite large and makes little sense in a web-based editor like codemirror.
So we should have a way to opt-out and cut-down the bundle size by half.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
In the expand abbreviation demo, when you "try it yourself" and expand an abbreviation like ul>li
, the <li>
will be indented with a tab, even though the code in the editor is indented using spaces.
JS Bin uses Code Mirror and the emmet plugin. This same bug exists in reverse there: jsbin/jsbin#2153 The child gets indented with 2 spaces though the editor is configured to indent with tabs and all preexisting html is also tab-indented.
Hi,
I'm trying to use some personal snippets using the scss profile, but with no real success ^^
running this in a browser
// Init CodeMirror
editor = CodeMirror.fromTextArea(document.getElementById('code'), {
mode: 'text/x-scss',
profile: 'scss', /* define Emmet output profile */
});
// Add user Snippets
emmetCodeMirror.emmet.loadSnippets({
"scss": {
"snippets": {
'!': "!default",
'mix': "@mixin $1($2){\n|\n}",
'func': "@function $1($2){\n|\n}"
}
}
});
emmetCodeMirror(editor);
always return an error in console Cannot use 'in' operator to search for 'tag_case' in scss
.
maybe it's just cause i'm using this in browser, or i've misunderstood something….
I'm a Windows user.
Somehow, Merge Lines doesn't work with the Default keybindings : Shift-Cmd-M
, but does work if change to Cmd-Shift-M
.
It's strange, but can you switch the order?
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/2532605-change-merge-lines-shortcut-key-order?utm_campaign=plugin&utm_content=tracker%2F438327&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F438327&utm_medium=issues&utm_source=github).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.