You are not logged in.
Got off my ass and bent hak_editarea to my fiendish ends. grab it here mrd_codeMirror »
This plugin uses a javascript library called “codeMirror” to format and syntax color textareas in Textpattern’s Forms, Pages and Style tabs
CodeMirror is a JavaScript component that provides a code editor in the browser. When a mode is available for the language you are coding in, it will color your code, and optionally help with indentation.
This plugin requires the following files (included) to be present in the /scripts directory of your site root.
This plugin was prompted by Simon Finch’s CodeMirror admin theme and was made possible by blatatl ripping off Patrick Woods’s hak_edit_area plugin.
Please, oh please, would someone do a better job of this plugin? I’m beggin’.
Offline
Mr Dale,
Wow, so very fast of you and very nice. Works as intended.
Some quick observations
In your distribution there is no codeMirror sub-folder in the scripts folder, the css and js files are in the scripts folder. Easy enough here to create the codeMirror folder and move the ccs and js into it to make the plugin work but you would want to fix it.
Interferes with CSS in Remora, the navigation dropdowns don’t have enough “Z” to appear in front of the codeMirror edit areas. In Hive, it does a neat job of deconstructing a lot of Mr Wareham’s good works.
Offline
Just another quick observation: you should provide a stylesheet that only covers the styling needed for the plugin instead of overwriting the rest of the theme (side columns, font-sizing, colours, etc).
Offline
phiw13 wrote: Just another quick observation: you should provide a stylesheet that only covers the styling needed.
Yeah, I totally spaced that. Like a total dozer I just copied the whole theme. I just updated the css to only include the codeMirror specific stuff.
Last edited by mrdale (2012-05-07 04:05:12)
Offline
joebaich wrote: In your distribution there is no codeMirror sub-folder in the scripts folder, the css and js files are in the scripts folder… Interferes with CSS in Remora…
These issues (relating to my brainless inclusion of the whole admin theme style sheet) should now be fixed…
Last edited by mrdale (2012-05-07 04:09:08)
Offline
Support for JavaScript in editors created by the spf_js or stm_javascript plugins would be great!
Offline
MattD wrote: Support for JavaScript in editors created by the spf_js or stm_javascript plugins would be great!
feel free to hack it in.
Offline
mrdale wrote:
feel free to hack it in.
I was trying before I posted but I get a javascript error and haven’t had a chance to look into it further. It seems the version of javascript.js I found doesn’t work the same as css_min.js and htmlmixed_min.js that are included with your download.
Offline