On 7/3/11 1:31 AM, Alex Juarez wrote:
Hi Jason,

     From what you're saying, it's pretty clear to me that I don't have
    the same understanding of EditArea that you do (not surprising,
    since you've spent a lot of time with EditArea and I haven't).  For
    example, when I search for traces of codemirror in editarea, I see
    nothing:

    ~/Downloads/editarea_0_8_2% grep -ri mirror *
    ~/Downloads/editarea_0_8_2%


As far as I can tell, the reason this doesn't show up in the quick
search is because the coder obfuscated the code for some unknown reason
renaming functions that were ports from tinyMCE and codeMirror. Making
the project more difficult to work with.

That's true that it would be harder to work with. The search above went through all of the source (un-minified) and all of the docs for EditArea. I figured that at least a mention of codemirror would show up *somewhere* in the docs, if nothing else. What evidence leads you to believe that editarea used code from codemirror?


As for a response, I am not suggesting that we use EditArea in
production, because it as you pointed out does not fully implement code
mirror or tinyMCE. But, what I am suggesting is that we look to it as a
frame work to create a unified solution. The way that I would for see
approaching this is taking the TInyMCE, prompt ripping out the normal
window and replacing that with a codemirror window to create a hybrid
code-text editor.

It would start with <body id="tinymce" class="mceContentBody "
contenteditable="true" spellcheck="false" dir="ltr"></body> and changing
that content be produced through codeMirror. Then we could validate it
at javascript level running it through code validator as EditArea did.
(in this case it would be code mirror for us.)

Hmm...I think we'd have to go higher than the body tag. IIRC, tinyMCE (so maybe EditArea too) does things inside of an iframe so that the buttons work well with selections, but codemirror2 does things just inside of a div (again, IIRC).

Again, good luck (that's not sarcastic; I wish you the best). It certainly seems like an ambitious project to rewrite EditArea and then maintain it.

If I were doing smarter code cells, I'd probably stick with just trying to implement straight CodeMirror2 code cells, even if only just to test if it's even feasible these days. (It hasn't been in the past when we've tried because it was way too slow and buggy, but CodeMirror has been rewritten now and browsers are *much* faster at javascript these days).

Thanks,

Jason

--
Jason Grout

--
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

Reply via email to