Giter VIP home page Giter VIP logo

Comments (20)

maxart avatar maxart commented on August 17, 2024

This is awesome news, I cannot wait for the plugin to be released!

from emmet.

egeozcan avatar egeozcan commented on August 17, 2024

any updates yet?

from emmet.

 avatar commented on August 17, 2024

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.

sergeche avatar sergeche commented on August 17, 2024

I'll try to create CodeMirror plugin on this weekend, so stay tuned for commit updates

from emmet.

egeozcan avatar egeozcan commented on August 17, 2024

looking forward to updates

from emmet.

sergeche avatar sergeche commented on August 17, 2024

I've pushed beta version of ZC for CodeMirror plugin, see Downloads section.

How to use:

  1. Download plugin: https://github.com/downloads/sergeche/zen-coding/Zen.Coding-CodeMirror.v0.7.zip
  2. Add zen_codemirror.js to the HTML page with CodeMirror editor
  3. 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.

 avatar commented on August 17, 2024

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.

 avatar commented on August 17, 2024

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.

sergeche avatar sergeche commented on August 17, 2024

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.

sergeche avatar sergeche commented on August 17, 2024

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.

 avatar commented on August 17, 2024

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.

 avatar commented on August 17, 2024

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.

sergeche avatar sergeche commented on August 17, 2024

I can't see any double execution on demo page: http://zen-coding.ru/codemirror/
What browser you're using?

from emmet.

egeozcan avatar egeozcan commented on August 17, 2024

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.

 avatar commented on August 17, 2024

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.

sergeche avatar sergeche commented on August 17, 2024

Fixed double-execution bug in Firefox and Opera, see demo page

from emmet.

egeozcan avatar egeozcan commented on August 17, 2024

Heavily tested with various examples found over the net. Not a single problem or quirk, yet. Thank you, thank you, thank you.

from emmet.

 avatar commented on August 17, 2024

It all works great for me - thanks for your sterling work!

from emmet.

sergeche avatar sergeche commented on August 17, 2024

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.

sergeche avatar sergeche commented on August 17, 2024

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)

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.