WISE-Community / WISE-VLE--Deprecated--

Virtual Learning Environment (VLE) for the Web-based Inquiry Science Environment (WISE). *Note: deprecated and has been merged into the main 'WISE' repository*
8 stars 8 forks source link

AT Flash step HTML/RTE toggle bug? #53

Open hirokiterashima opened 12 years ago

hirokiterashima commented 12 years ago

Look into report from Camillia: When I'm in the new Flash step and I toggle between the HTML view and the Rich Text view (then back to HTML), whole sections of my code disappear. If I save the project with the code still intact, it all seems to render fine when previewing the project. But if I go back to edit things, I have to make sure I have my intact code saved somewhere else so I can copy and paste it back into the authoring environment.

Original code:

Recording your Observations



Sandra, Eduardo, and their kids, Maya and Ada
Andrea Chavez

My friend Sandra just learned that she has breast cancer. Luckily, her doctors think that with the proper care, she has a good chance of survival.

So Sandra asked me: "What makes a good cancer medicine?"

I could sure use your help to answer her question!

In this project, we'll learn what cancer does to the body to understand how a medicine can help treat it.

Then, you'll help me investigate which of the THREE plants I collected might make a good cancer medicine.

I hope by the end, you'll be able to help me answer Sandra's question. Go on to the next step to get started!

Altered code:

Recording your Observations



Sandra, Eduardo, and their kids, Maya and Ada
  Andrea ChavezIn this project, we'll learn what cancer does to the body to understand how a medicine can help treat it.

Then, you'll help me investigate which of the THREE plants I collected might make a good cancer medicine.

I hope by the end, you'll be able to help me answer Sandra's question. Go on to the next step to get started!
breity commented 12 years ago

Yeah, I think this is also an issue with malformed html in the step. TinyMCE tries to cleanup html code when it toggles off and I imagine that is where the missing elements come from. We may not want to do anything here, as we want to encourage/require correct html/css from authors. Perhaps some sort of validation, as we discussed, would make sense so that authors can see where their html needs fixing.

hirokiterashima commented 12 years ago

I agree. Can we add some kind of warning? We shouldn't just delete stuff without telling the authors about what's going on.

breity commented 12 years ago

That may be a bit more complicated, as TinyMCE handles the cleanup. I'll take a look at TinyMCE's documentation and see if there's a callback (or pre-cleaner event). The other option would be to disable the automatic cleaning in TinyMCE and try to handle validation later on ourselves (when an author attempts to save the step, for example).