I installed FCK Editor and Drutex modules on my Drupal web site. I found that when I insert a latex formula where the symbol ">" or "<" appears, the FCK Editor replace those symbols with ">" and "<", respectively. This change produces a nasty latex formula.
Same problem occurs when i use too much spaces or when i use any other html symbol like "&" on the formula.
I would like that FCK Editor keep his hand out of the latex region, but it seems complicated. I think, an easier solution would be to modify DruTeX module. Drutex just have to correct this error by reconstructing the original string using something like html_entity_decode()
.
I modify the module my self adding the line $text = html_entity_decode($text);
on the next context:
function drutex_render($text, $format = -1, $attributes = '', $default_attributes = '') {
$text = _drutex_unescape($text);
+$text = html_entity_decode($text);
if (drutex_submodule_is_active('security', $format)) {
But i don't know if this change could cause too much trouble. But at the moment, i got no more nasty rendered formulas.
Comments
Comment #1
ShaunDychko CreditAttribution: ShaunDychko commentedHi There, add:
to the file modules/fckeditor/fckeditor.config.js and enter your equations in Source mode between <tex> and </tex> tags. (note that the equations won't be visible back in WYSIWYG mode, which is by design since it means FCKEditor is keeping it's hands off).
Comment #2
jrviorato CreditAttribution: jrviorato commentedComment #3
jrviorato CreditAttribution: jrviorato commentedI try that one checkmark, but I hate to be constantly switching from WYSIWYG to Source mode. My web site uses a lot of Math formulas and not seeing them on WYSIWYG mode makes WYSIWYG useless.
Comment #4
ShaunDychko CreditAttribution: ShaunDychko commentedTry http://drupal.org/node/803562#comment-4850664 for a better solution.
Comment #5
Jhun Vert CreditAttribution: Jhun Vert commentedTry to rearrange the filter of your input formats so that Drutex will come first before HTML corrector. I encountered this problem before and the rearrangement solved my trouble.