Cut and Paste

"BTW, I have been working on a much better blog editor. Anyone know if it is possible to tell "paste" to just keep the carriage returns and drop all of the other style formatting?"
[ScottW]

From the great DHTML reference at MSDN:

Creating custom code to enable the Paste command requires several steps.

  1. Set the event object returnValue to false in the onbeforepaste event to enable the Paste shortcut menu item.
  2. Cancel the default behavior of the browser by setting the event object returnValue to false in the onpaste event handler. This applies only to objects, such as the text box, that have a default behavior defined for them.
  3. Specify a data format in which to paste the selection through the getData method of the clipboardData object.
  4. Invoke the method in the onpaste event to execute custom paste code.

No Comments