Giter VIP home page Giter VIP logo

Comments (15)

pepelsbey avatar pepelsbey commented on August 24, 2024

+1 for Zen Coding, but it would be better to implement newer syntax: https://github.com/pepelsbey/zen-coding-snippets β€” see CSS.txt and HTML.txt for the snippets and http://zen-coding.ru/textarea/ for the JS demo.

from dabblet.

goshacmd avatar goshacmd commented on August 24, 2024

πŸ‘

from dabblet.

LeaVerou avatar LeaVerou commented on August 24, 2024

I might, if lots of people request it. So if it's something you want to see, please post here and say so.

Although I'd prefer to code some sort of generic system to allow people to use whatever such script they want.

from dabblet.

kizu avatar kizu commented on August 24, 2024

+1 for Zen Coding, it's one of the best ways to write HTML quickly. Having it there by default would be great, 'cause it's almost become an industry standard: it's already included by default in Sublime Text 2, Espresso, and many others.

from dabblet.

kigorw avatar kigorw commented on August 24, 2024

+1, must have feature.

from dabblet.

apoleshchuk avatar apoleshchuk commented on August 24, 2024

πŸ‘

from dabblet.

remitbri avatar remitbri commented on August 24, 2024

Pretty please!

from dabblet.

LeaVerou avatar LeaVerou commented on August 24, 2024

Can anyone answer the following questions, as I don't personally use zen coding and I can't figure it out from the docs?

  • Is it only for HTML generation? So it only has to be integrated in the HTML tab, right?
  • Does it have a function to tell if some typed code uses Zen Coding or not?
  • Is there any online demo? I can't figure out how that textarea demo on the website works at all. I type in it, nothing happens.

from dabblet.

pepelsbey avatar pepelsbey commented on August 24, 2024

β€” ZC generates both CSS and HTML, based on snippets, see CSS.txt and HTML.txt

tr + Tab should give you

-webkit-transition:$1;
-moz-transition:$1;
-ms-transition:$1;
-o-transition:$1;
transition:$1;

β€” I'm not sure, it's better to ask https://github.com/sergeche
β€” Go to textarea type html:5 and press Tab

from dabblet.

kizu avatar kizu commented on August 24, 2024
  1. There're some CSS snippets: http://code.google.com/p/zen-coding/wiki/ZenCSSPropertiesEn β€” they are static, so in feature there would be something to replace them. But for start even this would be enough for CSS.
  2. On such questions you can ask @sergeche or zen_coding at twitter. From what I know it must be not so hard to add zen-coding to contenteditable: there is a plug-in for codemirror.
  3. Just press tab after abbreviation here or there :) It's not something that write code automatically, you must call it manually by tab, so it won't cause any issues to anyone who don't use zen-coding, since it needs some code in abbreviation and if there are only whitespaces, then it would just use default behavior of tab.

from dabblet.

LeaVerou avatar LeaVerou commented on August 24, 2024

Oh that's very good, I guess I can include it by default then, as long as it's loaded asynchronously and doesn't block initial load. I'd only need to customize pre.onkeydown to avoid inserting a tab character on these cases.

I wonder if the guys at Zen Coding want to help with the integration.

Edit: On second thinking, this is probably a large download, so it should be loaded conditionally. So I'd better add a setting about it.

from dabblet.

sergeche avatar sergeche commented on August 24, 2024

@LeaVerou, I can answer your questions and provide any help on ZC implementation. All you need is to implement Zen Editor interface in order to let ZC core know how to talk with back-end editor: https://github.com/sergeche/zen-coding/wiki/plugin-howto

  1. ZC is actually an advanced snippets system, used to generate structured data. It’s primary used for XHTML generation, but can be adapted to any other structured data. Basically, it parses CSS-like abbreviation into a tree and then produces output based on filters.
  2. Most ZC actions returns true or false depending on if action was performed successfully. So, after you implement editor interface, you can call zen_coding.runAction('expand_abbreviation', editor, syntaxMode) and it will return true if abbreviation was expanded successfully, false otherwise. You can also call zen_coding.runAction('expand_abbreviation_with_tab', editor, syntaxMode), which will try to expand abbreviation and put 'tab' if it fails. Actions are defined in https://github.com/sergeche/zen-coding/blob/master/javascript/zen_actions.js#L1009

from dabblet.

LeaVerou avatar LeaVerou commented on August 24, 2024

I just checked out the implementation for codemirror and it looks kinda huge ( https://github.com/sergeche/zen-coding/blob/master/plugins/codemirror/zen_editor.js )
I most certainly can't devote that much time to this, especially now with 20+ other open issues to take care of. If anybody wants to do it, I can help. It has to be easier, as in dabblet:

  • old browsers don't matter
  • I've implemented read-only element.selectionStart / element.selectionEnd and element.setSelectionRange() for setting the selection, so it should work similarly to a textarea, with textContent instead of value (but I can set an accessor on value so it would work identically)

Also, it seems Zen Coding implements some things already in dabblet (increment/decrement) which would need to be removed from the bundled version.

from dabblet.

iamstarkov avatar iamstarkov commented on August 24, 2024

+1 for Zen Coding

from dabblet.

plakadiva avatar plakadiva commented on August 24, 2024

+1 Emmet rocks!

from dabblet.

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.