1. #21
    Sencha User chesstrix's Avatar
    Join Date
    Apr 2008
    Posts
    117
    Vote Rating
    1
    chesstrix is on a distinguished road

      0  

    Thumbs up Nice work

    Nice work


    Works like a charm.
    Thank you for posting.

  2. #22
    Sencha User steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,663
    Vote Rating
    6
    steffenk has a spectacular aura about steffenk has a spectacular aura about steffenk has a spectacular aura about

      0  

    Default


    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

  3. #23
    Sencha User steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,663
    Vote Rating
    6
    steffenk has a spectacular aura about steffenk has a spectacular aura about steffenk has a spectacular aura about

      0  

    Default


    Quote Originally Posted by Stju View Post
    Code:
            parser: 'php',
    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

  4. #24
    Sencha - Services Team Stju's Avatar
    Join Date
    Dec 2008
    Location
    Redwood city, California
    Posts
    288
    Vote Rating
    3
    Stju is on a distinguished road

      0  

    Default


    Quote Originally Posted by steffenk View Post
    this won't work.
    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

  5. #25
    Sencha User steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,663
    Vote Rating
    6
    steffenk has a spectacular aura about steffenk has a spectacular aura about steffenk has a spectacular aura about

      0  

    Default


    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

  6. #26
    Sencha - Services Team Stju's Avatar
    Join Date
    Dec 2008
    Location
    Redwood city, California
    Posts
    288
    Vote Rating
    3
    Stju is on a distinguished road

      0  

    Default


    Hi!
    Yes, already gave some hands over first beta BTW wanted to say the same Let's keep fingers crossed!

  7. #27
    Sencha User khebs@live.com's Avatar
    Join Date
    Mar 2008
    Posts
    83
    Vote Rating
    0
    khebs@live.com is on a distinguished road

      0  

    Default 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';

  8. #28
    Sencha User
    Join Date
    Sep 2009
    Location
    Germany
    Posts
    34
    Vote Rating
    0
    SnakeMedia is on a distinguished road

      0  

    Wink 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....

  9. #29
    Sencha User
    Join Date
    Apr 2007
    Posts
    83
    Vote Rating
    5
    bobmanc is on a distinguished road

      0  

    Default


    i know it is early yet but is there an ExtJS v4 version in the works?

  10. #30
    Ext JS Premium Member
    Join Date
    Jul 2007
    Location
    Denmark
    Posts
    6
    Vote Rating
    0
    vlx is on a distinguished road

      0  

    Default 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