modmore / codemirror Goto Github PK
View Code? Open in Web Editor NEWIntegration for CodeMirror into MODx Revolution
Integration for CodeMirror into MODx Revolution
Not sure if this is related to the issue I just opened, but I'm experiencing them simultaneously. While editing and saving chunks w/ CodeMirror turned on as the element RTE, sometimes the save button does not "un-grey" when I make changes to the chunk contents. Have to click outside of codemirror and use Ctrl+Alt+S to save.
does not auto-assign the Setting value of which_element_editor on install as seen on http://modxcms.com/forums/index.php/topic,51509.0/topicseen.html
Hello Shaun,
I updated Revo to rev7058, and now Codemirror doesn't work anymore. I tried to increase the loader-delay to 900, no change... I also cleared my site cache and my browsers caches, same thing, codemirror doesn't work anymore...
Same behaviour on Chrome and FF, I did not try with IE...
Cheers
When working with Static Resources CodeMirror is not included on the manager page. This breaks packages like Redactor that use it for syntax highlighting.
After Installing CodeMirror in fresh MODX install - version 2.3.3
Error log:
(ERROR @ /administracja/index.php) [OnHandleRequest]
(ERROR @ /administracja/index.php) [OnManagerPageInit]
This error happens from time to time. Manager page displays only top menu after this error and loads properly after pressing F5 in browser.
This error also appear after installing Ace editor....
When I create a new chunk w/ CodeMirror set as "which_element_editor", and try to call a snippet, the chunk contents are getting truncated in the middle of the snippet call.
Example chunk:
When I key this in to CodeMirror and save the chunk and reopen it, I get something like
It seems to be truncating at different places. Not sure if it is based on number of characters w/ a buffer of some sort, or what it might be.
After opening and resaving a few times, it seems like the chunk code will save correctly and then continue to save correctly with any edits... but it is unclear to me what is causing that. I can recreate this problem repeatedly by creating a new chunk w/ a snippet call in it.
I know there is an option to select CodeMirror for Rich Text Editor globally.
But I don't want to use it on all resources.
I Would like to have CodeMirror enabled for specific individual resources.
Just like disabling "Rich tekst" on a individual resource works right now by unchecking a checkbox.
If you enter a search term into the Search input field below the CodeMirror editor, clicking "Search" once will highlight the first occurrence, but subsequent clicks throws the following error:
Uncaught TypeError: Property '0' of object [object Object],[object Object] is not a function (cm.js:104)
I tried troubleshooting a few things, but oddly commenting out the internals of the unmark function seems to correct the issue, and subsequent searches work as expected.
Would be nice to make the soft-wrap configurable if that is supported.
hey guys,
i want to insert elements in e.g. resources content, templates and other elements.
how can i enable it?
each time I run the Code Mirror (even from the earlier versions), these always came out on the error logs:
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
[2010-09-19 03:03:05](ERROR @ D:localhostmy-site.comcorexpdoxpdo.class.php : 1731) PHP warning: json_encode() [function.json-encode]: recursion detected
Syntax error, perhaps?
I'm running modx 2.0.2-pl on FireFox 3.6.8 for Windows XP.
Server settings are on my signature.
When CodeMirror is selected as which_element_editor (Revo 2.0pl), it also becomes the editor for files in the Files tree IF they are left-clicked on rather than right-clicking and choosing "edit file".
The more I think of it, the fact that it works on Files at all is probably an unintentional bug/feature, right?
Anyway, left-clicking on a file opens the file for editing, but the code usually does not display in the CodeMirror area the first time. If you have the file open, then left-click again on that same file in the tree, it seems to always correctly display the file contents in the CodeMirror area.
Windows XP, Chrome & Firefox...
This is the best in-browser editing experience there is, it would be great to have it available for editing resources. It would also be cool to have it as a file editor in the files tab.
Hi splittingred!
Great plugin, this makes modx finally usable!
One thing would be awesome, if you could connect the codemirror's save callback (standard is crtl/cmd + s) with the modx save button, so that you don't always have to use your mouse to save minor changes, which sucks.
If you don't have time, maybe you know the Modx javascript function to call for this?
kind regards!
Lines 18-22 are highlighted in red.
Hello
I noticed a strange behavior of codeMirror 1.1.0 rc1 running on Revo 2.0.1-pl (from Git branch origin/2.0)
I detailed it on the forum http://modxcms.com/forums/index.php/topic,53699.msg310493.html#msg310493...
If you have a bit of time would you be kind to have a quick look at it ?
thanks
Cheers
update extension to use the latest CodeMirror 2.0
Apologies for the impatient request. splittingred is like the god father of MODx extras and must get a brazillion requests a day.
But the current version of this CodeMirror extra is gettin' glitchy and it is damn handy to have our code highlighted with all the coding done inside the manager, especially adding proper tab support is key. Issues seem especially prominent in Chrome; grayed out Save button and problems highlighting text. Similar issues in firefox.
Also, support for Zen Coding would be amazing:
http://zen-coding.ru/codemirror/
Man I'm a whiner. I should really just roll up my sleeves and see if I can figure out how to contribute.
Noted that you have included this ability in the changelog - but cannot seem to get it to function. Please note that I have TinyMCE installed as well, but the resources in question have the "Richtext" option disabled. Thoughts?
It would be great to use a CodeMirror enhanced textarea as a TV. At the moment we can only use CodeMirror in elements and in the RTE areas.
Many thanks,
Shaun
Hello,
I use codemirror, it works fine with HTML, JS, or PHP syntax, but not at all with CSS... Is this a bug or a normal behaviour ?
I would be great to have the colored syntax and automatic indent with CSS too...
Thanks
Cheers
PS- I have posted this in forum too
Since I fulltime work with Chrome the CodeMirror does show some weird things...
After 5 minutes of using it I cannot copy text which I have selected from the right to the left.. when I select from the left to the right I can copy it.
Another issue I have is that when I paste copied text the line is being duplicated after the first one. Just discovered; when I type ahead after this duplicate issue then a couple chars are removed and the duplicated line is removed also..
Maybe you can test a bit more in Chrome?
Which is causing "galleryitemtv" not to work, more details here: http://modxcms.com/forums/index.php/topic,51738.msg312759.html#msg312759
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.