On 7/2/11 7:47 PM, Alex Juarez wrote:
Hi Jason,
I might be able to shed some light on this. The basis of the package is
EditArea, based on tinyMCE some older version and a rough draft of
CodeMirror I think v1 or earlier. EditArea is similar to the Text field
that you get when you shift click. I only used this code view solution
since I thought eventually I could merge the functionality of the code
view with text editor to have one comprehensive solution, seeing that
they both use tiny MCE, (on a side note I think the tinyMCE loaded into
sage needs to be updated.)
You're right that it was horribly out of date. I updated it in March,
though, and I believe that version is what is running on the public
servers, though it hasn't made its way into Sage yet.
I think the needs of a word processor and a code editor are different
enough to warrant different solutions, if needed. Of course, it would
be better to have a unified solution that toggle back and forth between
the modes, but I think it's only better if the core functionality of
each mode doesn't suffer too much.
Ultimately, as far as functionally goes you are correct an ajax based
code editor will operate more consistently across all browsers, but I am
not convinced we need that level of stability especially when it
means forfeiting some of the nice features present in tinyMCE. Anyway, I
am up to writing the implementation of either solution.
I'm really glad you're jumping into the discussion, and I'm really glad
that you guys looked into this deeply. I too have wanted syntax
highlighting for a long time!
What nice features of tinyMCE would we forfeit if we moved to
CodeMirror2 instead of EditArea? Some advantages of CodeMirror2 over
EditArea include:
1. CodeMirror is active, EditArea appears not to be active
2. CodeMirror is based on more stable technology, and reportedly the
technology enables it to be *way* faster than it was when it was based
on the contenteditable system
3. CodeMirror is pretty lightweight (25K or so minified), while
edit_area_full.js is about 113K (minified)
I've got some ideas I'd like to bounce off of whoever is working on a
smarter code cell. I've posted them before to sage-notebook; I'll see
if I can find them.
Thanks,
Jason
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org