[email protected] wrote:
> Hello, this is related to the thread at
> http://groups.google.cz/group/sage-support/browse_thread/thread/2a699360a3847bab
>
> I think that installation of
> http://trac.sagemath.org/sage_trac/attachment/ticket/5564/trac_5564-2.patch
> causes that TinyMCE cannot be used to edit mathematical formulas
>
> If I enter $\int x dx$ in TinyMCE and exit the editor, I can see the
> picture representation for this formula formated by jsmath
>
> If I invoke TinyMCE again, i do not see TeX representation for the
> formula and hence, I cannot edit this formula. Can somebody confirm
> this bug, please? Thank you.
As a hint to whoever wants to hunt this down if they get to it before
me: the original text of the cell is stored in a parameter passed to
tinymce when tinymce is initialized. This is passed in the "data"
attribute in the following code from cell.py (after the two patches are
applied).
if JEDITABLE_TINYMCE and
hasattr(self.worksheet(),'is_published') and no
t self.worksheet().is_published():
s +=
"""<script>$("#cell_text_%s").unbind('dblclick').editable(funct
ion(value,settings) {
evaluate_text_cell_input(%s,value,settings);
return(value);
}, {
tooltip : "",
placeholder : "",
// type : 'textarea',
type : 'mce',
onblur : 'ignore',
select : false,
submit : 'Save changes',
cancel : 'Cancel changes',
event : "dblclick",
style : "inherit",
data : %r
});
</script>"""%(self.__id,self.__id,self.__text)
My guess is that something is wrong with this "data" parameter being
passed to the tinymce instance. If the data parameter is not passed,
then TinyMCE will use instead the html that is actually in the notebook,
which would be the formatted jsmath version, which is what the symptoms
indicate.
Jason
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---