-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
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%"> <borderlayout> <center flex="true" border="none"> <codemirror id="xmlEditor" syntax="xml" config="lineNumbers:true"/> </center> </borderlayout> </tabpanel>
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 127.0.0.1
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: http://127.0.0.1:8888/amrregina/zkau/web/js/codemirror/codemirror/js/editor.js
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 :)
Thanks.
The following code works for me, you can test it online at http://www.jease.org/cm.zul.
Cheers, Maik
<tabbox width="400px"> <tabs> <tab label="Tab 1" /> </tabs> <tabpanels> <tabpanel> <borderlayout height="300px"> <center flex="true" border="none"> <codemirror id="xmlEditor" syntax="xml" config="lineNumbers:true"/> </center> </borderlayout> </tabpanel> </tabpanels> </tabbox>
Asked: 2011-12-02 11:32:22 +0800
Seen: 192 times
Last updated: Dec 02 '11