Closed GoogleCodeExporter closed 9 years ago
Able to resolve the issue by trimming the name of the src attribute in function
saveAndUpdate() of editor HTML. Code snippet is attached below...
function saveAndUpdate(){
var mathml = getMathMLFromEditor();
var newId = parent.CKEDITOR.plugins.get('fmath_formula').addMathML(mathml);
ed.insertHtml("<img src='"+trim(name)+"' border='0' id='"+newId+"' data-mathml='" + escape(mathml) + "' />");
var dialog = parent.CKEDITOR.dialog.getCurrent();
dialog.hide();
}
// Trim Functions
function trim(str, chars) {
return ltrim(rtrim(str, chars), chars);
}
function ltrim(str, chars) {
chars = chars || "\\s";
return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
}
function rtrim(str, chars) {
chars = chars || "\\s";
return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
}
Original comment by abir2008...@gmail.com
on 6 Jan 2012 at 6:55
thank you :)
Original comment by ionel.alexandru@gmail.com
on 6 Jan 2012 at 3:11
Original comment by ionel.alexandru@gmail.com
on 25 Jan 2012 at 3:11
Original issue reported on code.google.com by
abir2008...@gmail.com
on 5 Jan 2012 at 9:35