-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi All,
I'm working for a client on a ZK-based app that includes an editor for small Groovy scripts. It currently uses a ZK multiline textbox. It works, but is about as easy to use as coding in Notepad (ack!). When I saw the editor that Guillaume Laforge included in the Groovy Web Console, I was blown away and wanted to add something similar to our app. It turns out that his editor (under the Apache Software License) is based on CodeMirror (under an even more liberal zlib-style license), a JavaScript editor library supporting multiple languages.
I've never created my own ZK component, but I'm guessing that would be the best way to integrate a CodeMirror-based editor with ZK. I'm starting by reading the Component Development Tutorial, but I'm guessing I'll have a lot of questions along the way. The exciting news is that I've received permission from my client to contribute the results back to the community. Would anyone be interested in helping me?
Thanks,
Matt
Hi Matt,
I'm interested in CodeMirror as source-editor for my Jease-CMS-Project.
There's a recent checkin in ZKForge, which seems to be a wrapper for EditArea:
http://zkforge.svn.sourceforge.net/viewvc/zkforge/trunk/editarea/
I've never worked with EditArea, but really like CodeMirror, so maybe we can use the existing source of EditArea as "template" which will guide us through the development of a ZK-Component for CodeMirror?
What do you think?
Cheers, Maik
@mpassell
That tutorial is somewhat out of date.
We are writing tutorial about how to develop zk5 component.
Many related material is in wiki now.
You may contact info at zkoss dot org for more material or training course.
ZK5 components are more well organized.
You can learn from the easy component like label, button.
editarea in ZKForge is under developing, but it does show some fundamental concept.
Thanks guys!
@Maik hmm, I didn't know about EditArea. I like the simple look of CodeMirror, but it's good to know about alternatives. As I mention below, I'm stuck with ZK 3.6.x for now. Is the same true for you or have you already made the move to ZK 5? (just want to know if the same component would work for both of us)
@Peter that's good to know. Unfortunately, I'll need to add the editor component before my client's product is ready to upgrade to ZK 5, so I'll have to stick with an approach that will work under ZK 3.6.x. Given that restriction, is that tutorial the right place to start?
Thanks,
Matt
Hi Matt,
I'm already made the move to ZK5 for all my projects, so ZK3 is history for me...:-)
I would suggest that I'm going to provide the CodeMirror-integration for ZK5, while you're doing the same for ZK3. We should agree on (and use) the same API for the server-side component, so you can switch CodeMirror easily after you've migrated to ZK5.
What do you think?
Cheers, Maik
@Maik ah, lucky you. :) The release I'm working on is already in beta, so the jump from ZK 3.6 to 5 will have to wait. Agreeing on the same API/structure (other than what needs to differ between 3.6 & 5), sounds like a great idea - good for anyone who, like me, is temporarily stuck, but will be moving on in the near future. (By the way, I just saw your email address on the Jease site - I'll send you a note.)
@Peter cool. Thanks for that reference. I'll start reading it right away. If you guys produce something that describes how the process of creating components is different between 3.6 and 5, that would be very helpful for me and Maik.
Thanks,
Matt
Peter, should we check our code into the ZK Forge project or figure out our own project hosting (SourceForge, Google Code, etc.)? If we should use the ZK Forge, do we need to be given commit access?
Thanks,
Matt
@Peter
Thanks, I'll go do that. I hope what I put together is worth sharing. ;)
Asked: 2010-04-08 11:07:29 +0800
Seen: 1,907 times
Last updated: Sep 03 '12