-
7 Feb 2011 3:02 PM #21
Nice work
Nice work
Works like a charm.
Thank you for posting.
-
10 Feb 2011 2:32 PM #22
I implemented codemirror in TYPO3 with ExtJS and built a fileeditor which highlights all kinds of files. Integrated jslint, versioning, and much more.
It works great with latest codemirror. If you are interested here is the main file:
http://forge.typo3.org/projects/typo...js/em_files.js
and it looks like this:
vg Steffen
--------------------------------------
Release Manager of TYPO3 4.5
energlobe.de - german online magazine
-
11 Feb 2011 1:50 AM #23
this won't work. parser is the class name of the parser you use and included.
Also raw phpParser won't work because the <? let's break the parsing.
This way it will work:
Code:parser: 'PHPHTMLMixedParser', parserfile: [ "parsexml.js", "parsecss.js", "tokenizejavascript.js", "parsejavascript.js", "../contrib/php/js/tokenizephp.js", "../contrib/php/js/parsephp.js", "../contrib/php/js/parsephphtmlmixed.js", "../contrib/sql/js/parsesql.js" ],
vg Steffen
--------------------------------------
Release Manager of TYPO3 4.5
energlobe.de - german online magazine
-
11 Feb 2011 2:23 AM #24
What do You mean with won't work? It will work if You don't use <?php, so for plain php it's working correctly. If You want to use it combined mode for php and html, there is already mixed class defined and it works like a charm
But be aware then in this case if You don't use <?php it won't highlight! So in general it depends on every other user case
Here are the samples:
mixed-without-php.png
php.png
mixed-short.png
mixed-with-php.png
-
11 Feb 2011 3:12 AM #25
Hi,
yes, exactly this is the problem with the parser that it depends of having php tag or not
I wrote this because i had errors using PHPParser with <?php ...
I wondered about parser: 'php', as i always use the correct classnames:
PHPParser, PHPHTMLMixedParser
With my debugs, all other declarations didn't worked. Unfortunally there is no try/catch, so wrong parser name direct throws js error.
btw - the author works on codemirror2 which is a complete rewrite with much cleaner code, i'm looking forward. Existing codemirror has some weakness.vg Steffen
--------------------------------------
Release Manager of TYPO3 4.5
energlobe.de - german online magazine
-
11 Feb 2011 3:18 AM #26
Hi!
Yes, already gave some hands over first beta
BTW wanted to say the same
Let's keep fingers crossed! 
-
13 Feb 2011 6:07 PM #27
Possible Simple Implementation?
Possible Simple Implementation?
I havent created a UX for this yet, since, i only used this for just 1 window.. but, this is what i did...
Code:var form = new Ext.form.FormPanel({ ... items: [{ xtype: 'textarea', name: 'addjson' ... }] ... }); var textarea = form.getForm().findField('addjson'); jsonfield = CodeMirror.fromTextArea(textarea.el.dom, { height: textarea.getHeight() + 'px', content: textarea.getValue(), parserfile: ["tokenizejavascript.js", "parsejavascript.js"], stylesheet: __baseurl + "lib/codemirror/css/jscolors.css", path: __baseurl + "lib/codemirror/js/", autoMatchParens: true, textWrapping: false, width: textarea.getWidth(), parserConfig: { json: true } }); // Just to remove the invalid marker // jsonfield.frame.contentWindow.addEventListener('keydown', function(e){ jsonfield.wrapping.className = 'x-form-text x-form-field no-margin-field'; }); jsonfield.wrapping.className = 'x-form-text x-form-field no-margin-field';
-
16 Feb 2011 2:35 PM #28
Nice Work!
Nice Work!
Hello @qulys,
good work and keep your development for nice application ^^!
1. Question: Can you update with preview?
I give a nice suggestion for preview per html site and support with javascript frameworks like Extjs or Qooxdoo and any frameworks of js to preview...
2. Question: Paint-able function like xur framework or any function with css-style?
Example: I create an shape quadrat with border than i save new image / sprite into local drive.
Do you believe posible via paint function without flash application only JS-Framework?
Thanks for new component, awesome! ^^I am deaf.
SnakeMedia Inc:
Ext Demo Browser: http://sm-extjs.zxq.net/facebook/extdemobrowser/
Ext Book - coming soon!
Ext Twitter - coming soon!
and Ext nice applications - coming soon....
-
4 Apr 2011 11:15 AM #29
i know it is early yet but is there an ExtJS v4 version in the works?
-
27 May 2011 2:19 AM #30
Extjs 4.0 port
Extjs 4.0 port
Hi,
I have made a port to ExjJS 4.0 and CodeMirror 2.0, hope someone can use it.
Ext.Ux.panel.CodeMirror.zip


Reply With Quote