ZK-CodeMirror problems

asked 2011-12-02 11:32:22 +0800

Lesstra gravatar image Lesstra
193 1

I downloaded codemirror.jar from google projects, it is 1.0.1 version (seen in lang-addon.xml inside the jar). I use ZK 5.0.6. My developement OS is Windows XP.
This is my .zul file content regarding codemirror:

<tabpanel height="100%">
        <center flex="true" border="none">
	    <codemirror id="xmlEditor" syntax="xml" config="lineNumbers:true"/>

Everything seems nice, editor is stretched inside the borderlayout and resize is working fine. Vertical scroll is shown as expected, horizontal is never shown (dont' know if it should be?) I'm setting XML content like xmlEditor.setValue(xmlContent) in the controller, and the XML content itself is CLOB stored in the database.

However, the problems I ran into are the following:

1) In Chrome (I guess this is the latest version as I'm writting this, 15.0.874.121) loaded string content is not visible at all when I'm using "localhost" instead of

2) In Firefox (7.0.1) content is visible, but line number bar has corrupted styling (it is not light gray, and numbers are somewhat bigger)

3) Error caught in Firefox error console: Error: attempt to run compile-and-go script on a cleared scope
Source File:
Line: 1419

I'm aware that the latter is probably something related to codemirror.js itself...
I don't know whether this is something to worry about at all. If not, please, let someone enlighten me :)

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2011-12-02 12:21:11 +0800

mjablonski gravatar image mjablonski
1284 3 5

The following code works for me, you can test it online at http://www.jease.org/cm.zul.

Cheers, Maik

<tabbox width="400px">
  <tab label="Tab 1" />
    <borderlayout height="300px">
     <center flex="true" border="none">
      <codemirror id="xmlEditor" syntax="xml" config="lineNumbers:true"/>

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




Asked: 2011-12-02 11:32:22 +0800

Seen: 192 times

Last updated: Dec 02 '11

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