The html is getting created by a browser and varies from model to model. Plus there is a difference between starting an editor with an empty string or with '<p>something</p>'.
Generally yes, certainly it is fixable. I've already rewritten most of the browsers RTE functionality to our own engine and the controls of BR would be the next logical thing to do. But I'm buried under other projects at the moment. Maybe some day later.
--
Nikolay
> --
> You received this message because you are subscribed to the Google Groups "RightJS" group.
> To post to this group, send email to rig...@googlegroups.com.
> To unsubscribe from this group, send email to rightjs+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rightjs?hl=en.
>
--
Nikolay V. Nemshilov
The Web-Developer
Sure. I ended up writing most of the RTE engine from scratch because the browsers are unreliable. At the moment it handles the formatting/styles, images and so on. But I think the next step would be to cleanup the html from empty tags and make it control the new lines properly.
> I think I could do this in Ruby using an after save callback and lots
> of gsub calls, but it would be nice to have it baked into the editor.
I guess a ruby cleaner would be necessary anyways, because people might send crap some other way. Personally me I would parse it with Hpricot and rebuild back in a clean way. It also would be a good idea to nuke all the naughty tags like scripts and objects.
> ps - what does the 'save' button do? I can't figure it out.
It's simple. If the editor is on a form, then it will try to call the Form#send method to submit the form via ajax.
> For more options, visit this group at http://groups.google.com/group/rightjs?hl=en.