Comments (20)
This is awesome news, I cannot wait for the plugin to be released!
from emmet.
any updates yet?
from emmet.
I would really like to see this in wordpress theme editor - code mirror already has a wordpress plugin for back end theme editing - and with zen coding as a tag expander and snippet manager - it would finally be almost worth using instead of editing theme files locally.
from emmet.
I'll try to create CodeMirror plugin on this weekend, so stay tuned for commit updates
from emmet.
looking forward to updates
from emmet.
I've pushed beta version of ZC for CodeMirror plugin, see Downloads section.
How to use:
- Download plugin: https://github.com/downloads/sergeche/zen-coding/Zen.Coding-CodeMirror.v0.7.zip
- Add zen_codemirror.js to the HTML page with CodeMirror editor
- When creating new CodeMirror instance, you have to add two options, syntax and onLoad, like this:
CodeMirror.fromTextArea('code', {
height: "200px",
parserfile: "parsexml.js",
stylesheet: "./CodeMirror/css/xmlcolors.css",
path: "./CodeMirror/js/",
continuousScanning: 500,
lineNumbers: true,
syntax: 'html',
onLoad: function(editor){
zen_editor.bind(editor);
}
});
Available syntax: 'html', 'xml', 'css', 'xsl', 'haml'
Now you're ready to go. Type some abbreviation and hit Tab. You can also call zen_editor.showInfo()
method to see all available actions and shortcuts (note that your page should be in UTF-8 encoding to properly display some symbols).
Let me know if it works for you
from emmet.
Not working by initializing with editor - but works a bit by executing:
// var editor = CodeMirror.fromTextArea('code', { etc... });
setTimeout(function(){ zen_editor.bind(editor); },1500)
Tab expands 'html' correctly on mac firefox, but win IE6 expands as 'html'. Same for other tags.
All semicolon extensions are ignored - I assume because the 'syntax' property is not set int the correct place the way I am doing it. So, 'html:5' expands to 'html:5/html:5'.
I have latest version of code mirror installed.
from emmet.
Sorry, my code was not formatted correctly - so cut previous post - here it is again:
Not working by initializing with editor - but works a bit by executing:
// var editor = CodeMirror.fromTextArea('code', { etc... })
setTimeout(function(){ zen_editor.bind(editor); },1500)
Tab expands 'html' correctly on mac firefox, but win IE6 expands as:
html<html></html>
Same for other tags.
All semicolon extensions are ignored - I assume because the syntax is not set int the correct place the way I am doing it. So 'html:5' expands into:
<html:5></html:5>
from emmet.
There were a few bugs in CodeMirror package, including broken minified version and empty abbreviations vocabulary. You may re-download CodeMirror bundle. Also I've created online demo: http://zen-coding.ru/codemirror/
About IE6: I'll investigate this problem but it looks like a CM problem because I'm using provided API only.
from emmet.
I've tested in IE and confirm that CodeMirror incorrectly performs selected text replacement in this browser. I'll contact Marijn on this issue
from emmet.
Everything works great on mac by Firefox, and Safari.
Thanks for your through efforts.
IE6 on WinXP now has error as follows:
Line: 168
Char: 7
Error: Permission denied
Code: 0
I set as trusted site, and lowed privacy levels etc...
Not the most important issue - as IE6 is a poor quality browser, that is losing popularity - but the best feature of codemirror is that you can use it on any computer where sometimes you don't have a better alternative.
Cheers
from emmet.
I have gone through and tested all the features using zen_editor.showInfo()
I had to change the zen_codemirror.js encoding from 'UTF-8 without BOM' to 'UTF-8' to get a correct list of keys to use.
There were a few small bugs as follows
- Wrap with abbreviation works - but then prompts a second time, and if you cancel, it inserts a null tag
- Remove tag removes two tags
- All the incrementing numbers increment by twice what they should
All the problems seem to be executing a function twice, I have only bound zen-coding once.
from emmet.
I can't see any double execution on demo page: http://zen-coding.ru/codemirror/
What browser you're using?
from emmet.
Functions well on Firefox 3.6 & 4 Beta under Windows 7 Enterprise. I've seen one or two errors but couldn't find a reliable way of recreating them. I'll post further updates.
from emmet.
For me there is double execution happens on demo page too - the same. I am using Firefox 3.6.12 on Mac OS X 10.6.5.
I tried from Safari, and there is no problem with double execution.
from emmet.
Fixed double-execution bug in Firefox and Opera, see demo page
from emmet.
Heavily tested with various examples found over the net. Not a single problem or quirk, yet. Thank you, thank you, thank you.
from emmet.
It all works great for me - thanks for your sterling work!
from emmet.
There are still issues with IE that requires patching CodeMirror and minor issues with expanded abbreviations (sometimes caret placed in wrong position) so I can't officially release it. The latest CM plugin is available on demo page only.
from emmet.
Fixed IE issue with non-replaceable selection and some minor bugs. It still doesn't work in IE6 because of CM issues. The plugin is officially released (please re-download plugin again).
from emmet.
Related Issues (20)
- Why is there is "display: compact" ?
- Add d:c - > display: contents
- [VSCode] Emmet ignores snippet's double hyphen
- Support for Textmate2
- Action to jump to end of closing tag
- CSS Logical Properties Support HOT 10
- attributeQuotes - option for none or curly brackets HOT 6
- Add support for <data> tags HOT 2
- Error: Cannot find module scanner.cjs HOT 2
- Set color-scheme by default HOT 5
- Add abbreviations for data, meter and time + remove abbreviation for datagrid
- Dot leads to create none existing attribute
- Support for other JSX frameworks please HOT 7
- Attribute in parentheses such as div[(test)] doesn't expand properly
- Mydaily
- Remove cols="30" rows="10" from textarea Snippet HOT 5
- Doesn't work eclipse emmet installation
- Remove abbreviations for isindex, applet, keygen
- Add abbreviation for slot HOT 3
- link:favicon shortcut produces non-standard code
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emmet.