0

Integrating CodeMirror with ZK

asked 2010-04-08 11:07:29 +0800

mpassell gravatar image mpassell
54 3
http://blog.grovehillsoft...

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

delete flag offensive retag edit

19 Replies

Sort by ยป oldest newest

answered 2012-09-03 12:28:51 +0800

deepa gravatar image deepa
6

Oh okay..
Thank alot.. I will try it with Codemirror 2 version.

- Deepa

link publish delete flag offensive edit

answered 2012-09-03 10:18:23 +0800

mjablonski gravatar image mjablonski
1284 3 5
http://www.jease.org/

Hi,

I guess that's a limitation of CodeMirror 1... I'm planning to migrate zk-codemirror to CodeMirror 2, but I don't have any estamations when it will be done... hopefully this year.

Cheers, Maik

link publish delete flag offensive edit

answered 2012-09-03 07:46:33 +0800

deepa gravatar image deepa
6

Hi Maik ,
Thanks for the wonderful ZK-Codemirror. I have used that in my code.
But I have an issue regarding CPU usage.
When I create lot of codemirror components in single .zul file, it increases the CPU usage. I tested it with IE data profiler and got to know that "editor.js" is called multiple times when such zul is run.
Can you please help...
Thanks,
Deepa.

link publish delete flag offensive edit

answered 2010-10-20 15:28:05 +0800

twiegand gravatar image twiegand
1807 3

You've put a lot of work into this, Maik. Well played!

link publish delete flag offensive edit

answered 2010-10-20 15:18:46 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Good work, Maik :-)

link publish delete flag offensive edit

answered 2010-10-20 13:24:57 +0800

caclark gravatar image caclark
1753 2 5
http://clarktrips.intltwi...

Pretty cool, Maik!

link publish delete flag offensive edit

answered 2010-10-20 07:01:04 +0800

TonyQ gravatar image TonyQ
642
https://www.masterbranch....

looks great!:D

link publish delete flag offensive edit

answered 2010-10-20 06:56:13 +0800

PeterKuo gravatar image PeterKuo
481 2

NICE JOB!!!!

link publish delete flag offensive edit

answered 2010-10-20 05:43:32 +0800

mjablonski gravatar image mjablonski
1284 3 5
http://www.jease.org/

Hi,

I've just released a first version of ZK-CodeMirror:

http://code.google.com/p/zk-codemirror/

Demo is here:

http://www.jease.org/codemirror/

Hope you like it!

Maik

link publish delete flag offensive edit

answered 2010-05-09 20:03:38 +0800

PeterKuo gravatar image PeterKuo
481 2

I'm writing a smalltalk
http://docs.zkoss.org/wiki/Integrating_EditArea

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-04-08 11:07:29 +0800

Seen: 1,907 times

Last updated: Sep 03 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More