I have used wymeditor for an e-learning platform.
The problem happens when a tutor wants to include codes as part of the
lessons (the source code needs to be shown to students e.g. in
programming examples).
I expected wymeditor to convert the codes (html, php, etc) into
htmlspecialchars and they can be used without problem.
Example:
- Tutor includes "html code" in lesson text (to teach how to write a
simple html page for example). After POST action happens, the html
code is converted into html special chars, saved into database
correctly and can be viewed correctly later (the source code shown to
students , as we wanted).
like this one:
- Code: Select all
<HTML>
<HEAD>
<TITLE>Example 4-3</TITLE>
</HEAD>
<BODY>
This is a list of subjects covered in this lesson:
<UL>
<LI>Text Links
<LI>Image Links
<LI>Email Links
<LI>List of Items
</UL>
</BODY>
</HTML>
- However if the tutor tries to edit the text, all those encoded codes
are removed when the text is loaded into richtext box and the
whole lesson text becomes useless.
I'll appreciate if someone can help.
Thanks
Mac