Thanks David and everybody for the feedback. I have added a Warning
and Disclaimer to the code and the blog post and a pointer to this
discussion for now, until I understand how should I fix this:
So I guess here are my questions:
1. Is this the problem with the ckEditor or any editor that forces me
to add LiftRules.useXhtmlMimeType = false; ? Does this bypass some of
the checks that are done automatically by Lift? and now I have to
manually validate the incoming data as suggested above?
2. Is the way that I am doing it is wrong? ( and using ckEditor is
fine)... things like the way I execute a javascript code on the client-
side and fetch the body from the WYSISYG. I see that Olek points out
the [on click] might not be the best way. What is the best way of
doing it? I picked that approach based on this recommendation which I
believe is addressing the same problem: getting data from an editor.
In fact the topic suggests "how to read some data from html page"
https://groups.google.com/group/liftweb/browse_thread/thread/44d9136a1d761432
and the recommendation was:
David Pollak
View profile
More options May 20 2011, 7:16 pm
On Fri, Apr 8, 2011 at 1:11 AM, Lex <
lexri...@gmail.com> wrote:
> Seems like ajaxCall is what I need.
> This code works for me:
> "#ajaxSubmit" #> SHtml.ajaxSubmit("Save",process _) &
> "#testSpan [onclick]" #>
> SHtml.ajaxCall(JE.JsRaw("ckeditor.getData()"), { x => value = x;
> println("======>"+x)})
> But how can I execute ajaxCall in ajaxSubmit?
Just change to:
"#ajaxSubmit [onclick]" #> SHtml.ajaxCall(....)
3. Is the way I am making the editor to appear in a form in the
template is not right?
I think these are relevant questions even if I were to pick any other
WYSIWYG.
Any ideas that could help me out here? So far I know that incoming
HTML must be somehow validated, now what I dont know is that if I put
Lift back into XHTML mode, there are less things that I should worry
about.
I am not sure about the latter two though.
Any help or suggestion is much appreciated,
Rouzbeh