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

Template Syntax 1.6.1b

No permission to download

Naatan

Well-known member
#1
Naatan submitted a new resource:

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

Screenshots pretty much explain what it does. If you want to get a feel for what it does, check out the CodeMirror demo's.

Currently it does not have any configuration, I might add that later, depending on my personal needs and the popularity of this addon.
Read more about this resource...
 
#3
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?
 

Naatan

Well-known member
#4
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.
 

lasertits

Active member
#10
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
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.
Is this what you're looking for? http://xenforo.com/community/resources/geshi-syntax-highlighter.89/
 

lasertits

Active member
#12
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.
 

DRE

Well-known member
#16
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?
 

Naatan

Well-known member
#17
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?
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.

How can I change options of codemirror?

//I do not see the editor is resizable...
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

Active member
#18
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.
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?
 

Naatan

Well-known member
#19
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?
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?
 

Naatan

Well-known member
#20
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.
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.