GetSimple Support Forum
Theme Editor - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: GS Development Testing - (alpha/beta) (http://get-simple.info/forums/forumdisplay.php?fid=14)
+--- Thread: Theme Editor (/showthread.php?tid=2519)



Theme Editor - n00dles101 - 2011-12-20

With the new release of GetSimple 3.1 not too far away we have introduced a full theme editor in the system.

The following features have been enabled in the latest Beta Featured release r602.

Features of the new editor include;
  • Full syntax highlighting for JS/PHP/HTML/CSS files
  • Code folding, click the gutter or CTRL-Q to fold your code.
  • Search and replace -

    Ctrl-F / Cmd-F
    Start searching

    Ctrl-G / Cmd-G
    Find next

    Shift-Ctrl-G / Shift-Cmd-G
    Find previous

    Ctrl-R / Cmd-Option-F
    Replace

    Shift-Ctrl-R / Shift-Cmd-Option-F
    Replace all
  • Full screen editing , Press F11 (or ESC in Safari on Mac OS X) when cursor is in the editor to toggle full screen editing.



Theme Editor - Connie - 2011-12-20

that sounds really great, I will check it

which version is it?


Theme Editor - n00dles101 - 2011-12-20

@Connie, its using Codemirror 2 and has been included in the last few beta releases.
This additonal features are only in the new Beta download r602.


Theme Editor - Connie - 2011-12-20

the official red download-button leads ot Beta-Version 594, that was misleading for me (I am not so familiar with github, sourceforge etc.)

Thanks for the info


Theme Editor - n00dles101 - 2011-12-20

I'll get Chris to update that link.. I don't have access...

That version should have the basic editor, I've added these additions to the new version.


Theme Editor - calmos - 2011-12-21

Very promising Smile)
For the time being, highlighting works well but the other ones do not.
I just tried this on a fresh GS 3.1 r602, using Firefox 9.0 and Chrome 16, Win XP.


Theme Editor - Carlos - 2011-12-23

FYI there already existed a nice plugin by mvlcek that does more or less the same, but also for component editing: Theme highlighter


Theme Editor - datiswous - 2012-02-24

Code folding thing is cool.


Doe this also include a solution for the:

Quote:Maintaining Page Scroll Position after save or refresh

issue? (the issue is that it doesn't do so)


Edit: Nope


Theme Editor - shawn_a - 2012-02-25

Carlos Wrote:FYI there already existed a nice plugin by mvlcek that does more or less the same, but also for component editing: Theme highlighter

Yes, if you consider implementing this, I would definitively like to see it applied to all code inputs. I love my Theme highlighter + custom admin css. Components are necessary, also a hook to add it to plugin code fields would be awesome as well.


Theme Editor - Carlos - 2012-02-26

shawn_a Wrote:also a hook to add it to plugin code fields would be awesome as well.
That's a very good idea!


Theme Editor - Carlos - 2012-02-26

@n00dles101

I'm afraid the theme editor is only working fine for css files - php and js files are not coloured properly.

Paste the code from e.g. template.php in http://codemirror.net/1/contrib/php/ and see the difference.

(I don't know codemirror, but it may be that you're not setting the mode argument or something, depending on the type of file.)


Theme Editor - mvlcek - 2012-02-26

Carlos Wrote:@n00dles101

I'm afraid the theme editor is only working fine for css files - php and js files are not coloured properly.

Paste the code from e.g. template.php in http://codemirror.net/1/contrib/php/ and see the difference.

(I don't know codemirror, but it may be that you're not setting the mode argument or something, depending on the type of file.)

I had to patch CodeMirror for the Theme Highlighter plugin to correctly work with e.g. inline php code.


Theme Editor - datiswous - 2012-02-26

I updated mvlcek's Theme Highlighter plugin (and activated it), but now the code folding doesn't work anymore.

Wouldn't it be better to merge the features of mvlek's plugin into the core features instead of basically 2 projects?


Theme Editor - 5wooley4 - 2012-04-08

datiswous Wrote:Code folding thing is cool.


Doe this also include a solution for the:

Quote:Maintaining Page Scroll Position after save or refresh


issue? (the issue is that it doesn't do so)


Edit: Nope

I just wrote a plugin based on the code which saves through ajax. http://get-simple.info/extend/plugin/thajax/426/

Very nice editor by the way, I hope you don't mind that I based a lot of my code on it. Keep up the good work. Get-Simple is turning into my favorite CMS.


Theme Editor - datiswous - 2012-04-13

5wooley4 Wrote:I just wrote a plugin based on the code which saves through ajax. http://get-simple.info/extend/plugin/thajax/426/

Very nice editor by the way, I hope you don't mind that I based a lot of my code on it. Keep up the good work. Get-Simple is turning into my favorite CMS.

You do know the (new) Get-Simple editor is based on Codemirror 2?:

http://codemirror.net/


Theme Editor - Carlos - 2012-04-15

Found another issue: if you select text, it is not highlighted, doesn't change its background colour.


Theme Editor - Carlos - 2012-04-18

Carlos Wrote:if you select text, it is not highlighted, doesn't change its background colour.

Did anyone check this? Happens to me with 3.1.1 beta, but not with 3.1


Theme Editor - n00dles101 - 2012-04-19

@Carlos, something wrong with the codemirror bundle, will have this fixed tonight.


Theme Editor - n00dles101 - 2012-04-19

This should be sorted in the latest SVN version, it was a simple CSS issue...


Theme Editor - Carlos - 2012-04-20

It looks like it works ok when you select text across several lines, but if you only select some text in the current line, it is not highlighted (or maybe the selected text has the same background color as the active line: #F0FCFF)