1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unmaintained Template Syntax 1.6.1b

Replace the textarea's when editing templates with CodeMirror instances

  1. Naatan

    Naatan Well-Known Member

    Naatan submitted a new resource:

    Template Syntax (version 1.0) - Replace the textarea's when editing templates with CodeMirror instances

    Read more about this resource...
     
    Alien and Archet like this.
  2. Mutt

    Mutt Well-Known Member

    can't wait to try it out!
     
  3. Archet

    Archet Member

    This is absolutely fantastic. This should be a built-in feature in a feature xenforo release.

    I would like the edit window a bit bigger though, how do I change the width and height of it?
     
  4. Naatan

    Naatan Well-Known Member

    Archet, resizing is something I am already working on, as CodeMirror doesn't properly support it natively.

    It will only be vertical resizing though, as horizontal would screw up the layout. I could add an option to open it in a dialog though, which occupies a larger area of the screen.
     
    Alien and Archet like this.
  5. CFodder

    CFodder Well-Known Member

    Looks very nice indeed, definitely going to give it a whirl :).
     
  6. Naatan

    Naatan Well-Known Member

    Archet likes this.
  7. Archet

    Archet Member

    Very nice, however I have trouble finding where to change the editor size. I might be blind though, and would appreciate if you could point me in the right direction.
     
  8. Naatan

    Naatan Well-Known Member

    Just drag the bottom of the editor's text area.
     
  9. Archet

    Archet Member

    Haha, see! I told you I was blind! :p

    Thanks for the great addon. Very much appreciated!
     
  10. lasertits

    lasertits Active Member

    Love this. I'm curious what languages codemirror covers and if this could even be implemented into regular forum posts, as a separate resource of course. Given it didn't load or affect page loads on threads where there were no code posts, I think it would be great. Just a thought! Very useful resource for those who spend a lot of time customizing / developing.
     
  11. Archet

    Archet Member

    Is this what you're looking for? http://xenforo.com/community/resources/geshi-syntax-highlighter.89/
     
  12. lasertits

    lasertits Active Member

    Unfortunately no, that syntax loads on every page regardless of if a post contains code and reduces the page load quite a bit from my testing. This was a few months ago however so I'm unsure of its current updated status. This codemirror JS one seems to let the page load fast, and then the JS takes care of the syntax afterward, which makes sense to me, especially if JS loading is at the bottom of every page. Thanks though.
     
  13. duydangle

    duydangle Active Member

    How can I change options of codemirror?

    //I do not see the editor is resizable...
     
  14. DRE

    DRE Well-Known Member

    my css edits on a style that was a child style did not save. uninstalling for now.
     
  15. Naatan

    Naatan Well-Known Member

  16. DRE

    DRE Well-Known Member

    I read this: Now also works on style property pages

    The code I was referring to was a EXTRA.CSS edit.

    So it should work for that now?
     
  17. Naatan

    Naatan Well-Known Member

    Sorry I had not seen your message (apparently I don't get alerts for this discussion). I will check your bug when I have some time, hopefully this evening.

    There is no visual aid for the editor being resizable, except that the mouse cursor will change as you get to the bottom of the editor. Options were added in 1.2.
     
    duydangle likes this.
  18. duydangle

    duydangle Active Member

    Oh I thought that the box can be resized by mouse ^^. By the way 1.2 is an impressive update.

    Small suggest: Can you include Zen Coding? Do you have idea about implementing a code editor for members' uses?
     
  19. Naatan

    Naatan Well-Known Member

    Good idea on the Zen Coding, I might do this.

    What do you mean by implementing a code editor for members? What use would regular members have for a code editor?
     
    duydangle likes this.
  20. Naatan

    Naatan Well-Known Member

    Quick google search gave me this:

    http://alexgorbatchev.com/SyntaxHighlighter/

    That might be interesting to implement as an alternative to the GeSHi implementation. I do hate reinventing the wheel but I also hate having your server do work javascript can do just as well.
     
    lasertits likes this.

Share This Page