Re: How can i deactivate paste in a rich text edit box ?
- From: "Donius" <randomnameforfun@xxxxxxxxx>
- Date: 22 Sep 2005 06:44:45 -0700
The *only* reason to do anything on the client side is to help the
normal user. Since he isn't pasting bad HTML anyway, there is no need
to do anything. Even if he manages to paste bad HTML, the server will
remove it and (hopefully) display his result to him.
I disagree, here! I run some CMS' for some customers who are, let's
see...not technically savvy. I wish everyone could be on the up and
up, but they aren't always. One thing that they constantly do that
fouls up the system before we instituted some scripting ((both server
and client side)) is paste content from MS Word. This looks like html.
Smells like html. But breaks our editor and the resulting webpages
like there's no tomorrow.
So, Mr. Russell, to tell you what we did, on the JS end, we tested with
a regex on pasting and submission for basic valid xhtml ((google for
something that will work, i did!)), and then something similar on the
backend of our server before submission.
Hope that helps!
-Brendan
.
- References:
- How can i deactivate paste in a rich text edit box ?
- From: Seth Russell
- Re: How can i deactivate paste in a rich text edit box ?
- From: Lasse Reichstein Nielsen
- Re: How can i deactivate paste in a rich text edit box ?
- From: Seth Russell
- Re: How can i deactivate paste in a rich text edit box ?
- From: Lasse Reichstein Nielsen
- Re: How can i deactivate paste in a rich text edit box ?
- From: Lasse Reichstein Nielsen
- Re: How can i deactivate paste in a rich text edit box ?
- From: Seth Russell
- How can i deactivate paste in a rich text edit box ?
- Prev by Date: Re: dynamic content...
- Next by Date: Re: 'this' and prototypes
- Previous by thread: Re: How can i deactivate paste in a rich text edit box ?
- Next by thread: how to format Javascript Math results in some (predictable) tabular form?
- Index(es):
Relevant Pages
|
|