Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
spf_codemirror - syntax-highlighting and code-completion admin plugin
CodeMirror syntax-highlighting and Emmet code-completion plugin for Textpattern admin.
Edit pages, forms, css, javascript (and more) full-screen, in your browser, with a choice of syntax-highlighting and code-completion.
Customisable via preferences: choose a theme, font-size and full-screen hot-keys.
Thanks to Marijn (CodeMirror), Sergey (Zen Coding) and Dale (mrd_codeMirror).
Note: when upgrading please delete your old ‘codemirror’ directory and upload a new one (and obviously replace the plugin).
—
New version 1.0 requires CodeMirror 5.0.
For new features and instructions please see the README on GitHub
—
Emmet is pretty smart.
It even works with (opening and closing) Textpattern tags — try typing txp:if_section
and then hitting TAB.
—
Version history
1.0 – March 2015
- Changes for CodeMirror 5.0
- Added support for Plugin Composer (add a commented PHP tag:
//<?php
at start to enable) - Removed Minify support
- Enable or disable Emmet (for speed)
0.9 – October 2014
- Changes for CodeMirror 4.6
0.8 – January 2013
- Changes for CodeMirror 3.01 & Emmet 1.3.3
- Added match-highlighter feature for Pages, Forms & Javascript.
- Fixed search in full-screen mode.
- Code clean-up, CSS tweaks & Emmet documentation.
- Re-written for Textpattern 4.5.x (still works in 4.4.x).
- Upgraded to CodeMirror 2.35 and Emmet.
- Full-screen support – hit F5 (and Esc to exit).
- Basic preferences via Admin > Preferences > Advanced.
- CodeMirror folder structure now mirrors standard CodeMirror for easy upgrades.
- Automatic Minify support.
- CSS support for Zen Coding within style tags.
- Added code block indicators:
spf_codemirror START/END
. - Code cleanup.
- Added Zen Coding code completion to Pages and Forms (HTML).
- Upgraded to CodeMirror 2.25.
- Changed load order (to allow interaction with other plugins).
- first release.
Last edited by spiffin (2015-03-18 19:02:09)
Offline
Re: spf_codemirror - syntax-highlighting and code-completion admin plugin
Thanks for all your work on this Simon. It’s a great hike up in functionality for the TXP back end.
Offline
Re: spf_codemirror - syntax-highlighting and code-completion admin plugin
joebaich wrote:
Thanks for all your work on this Simon. It’s a great hike up in functionality for the TXP back end.
You’re welcome Joe.
Offline
#4 2012-05-27 11:24:59
- Szorstki
- Member
- From: Poland
- Registered: 2012-05-27
- Posts: 20
Re: spf_codemirror - syntax-highlighting and code-completion admin plugin
Hi, I’ve put “codemirror” folder in my Xampp project directory ( X:\Xampp\htdocs\txp\ ) but there’s no syntax-highlighting and changing themes in presentation forms/pages/styles/js don’t work. I’ve tried to put “codemirror” in txp\textpattern, but nothing changed. What is wrong? Probably I misunderstood install instructions :/
I am using Win7, TXP 4.4.1, Xampp 1.7.7. Plugin spf_codemirror is enabled.
Offline
Re: spf_codemirror - syntax-highlighting and code-completion admin plugin
Szorstki wrote:
I’ve tried to put “codemirror” in txp\textpattern, but nothing changed. What is wrong?
Hello
The ‘codemirror’ directory goes in the your root web directory (not inside the textpattern directory) and files should be accessible via e.g. :
[DocumentRoot]/codemirror/cm_combined_min.css
So, if your root URL is http://example.com, you should see the above css file in your browser at http://example.com/codemirror/cm_combined_min.css
.. and, if your root URL is ‘localhost’, you should see it at http://localhost/codemirror/cm_combined_min.css
If not:
- try the latest version (I just made a small tweak which might help you);
- check permissions on the ‘codemirror’ directory;
- check your Xampp DocumentRoot setting.
Simon
Last edited by spiffin (2012-06-09 23:01:13)
Offline
#6 2012-05-27 13:32:38
- Szorstki
- Member
- From: Poland
- Registered: 2012-05-27
- Posts: 20
Re: spf_codemirror - syntax-highlighting and code-completion admin plugin
Ok, X:\Xampp\htdocs\codemirror works, thanks a lot.
Offline
Re: spf_codemirror - syntax-highlighting and code-completion admin plugin
Way to make my work 100 times better inside a month. this is zackly what I was looking for {oh, the shame ;) }
[ mrdale starts uninstallling all instances of mrd_codemirror, installing spf_codemirror ]
Offline
Re: spf_codemirror - syntax-highlighting and code-completion admin plugin
zencoding for css?
Offline
Re: spf_codemirror - syntax-highlighting and code-completion admin plugin
mrdale wrote:
zencoding for css?
Hi Dale
It doesn’t work at present with CodeMirror .. it might if I separated them .. but I don’t have time to fiddle this week.
See Zen Coding downloads — and compare ‘Zen Coding for CodeMirror2’ with ‘Zen Coding for textarea’.
Simon
Last edited by spiffin (2012-05-29 19:01:36)
Offline
Re: spf_codemirror - syntax-highlighting and code-completion admin plugin
just curious really. so nice to have codemirror + zen regardless of css support.
Offline
Re: spf_codemirror - syntax-highlighting and code-completion admin plugin
@ Dale
Zen Coding for CSS now works – but only within style
tags (Pages & Forms) – for raw CSS (Style) just temporarily wrap your style sheet in a style
tag.
e.g. in Presentation > Styles type:
style + TAB and then, within the style tags, type @f + TAB.
Offline
Re: spf_codemirror - syntax-highlighting and code-completion admin plugin
cool! So now I’m adding a /*<style>*/
at the top of my css and a /*</style>*/
at the bottom and I can use abbrs at will. very nice.
Offline