2 Replies Latest reply on Nov 26, 2008 3:28 AM by 5barns

    Missing text/rtf clipboard format in AIR

    5barns
      When cutting and pasting rich text, AIR and Safari act differently. Dumping the dataTransfer.types in the browser shows a number of formats (many fairly arcane for the Mac) including text/plain and text/rtf. In AIR, only text/plain shows up; text/rtf doesn't (and neither do the other arcane formats). The AIR API seems to support text/rtf so what gives here? Perhaps there's a security issue I'm overlooking?
        • 1. Re: Missing text/rtf clipboard format in AIR
          Joe ... Ward Level 4
          AIR does not support the rtf format in the clipboard object provided by the cut and paste events generated by HTML content. Only the system clipboard object supports RTF.

          In the application sandbox, you can workaround this bug by accessing the system clipboard rather than the clipboard provided by the event object. Access the system clipboard with air.Clipboard.generalClipboard. This workaround won't work outside the application sandbox.
          • 2. Re: Missing text/rtf clipboard format in AIR
            5barns Level 1
            Just to make sure: This is a bug, right? Not a feature? I'm assuming so since things work a bit better on the Windows platform; I get text/plain, text/html and air:rtf when dragging from an external browser into an AIR-based HTML control.

            While sometimes the drag is initiated from an HTML control from within AIR, often our users need to drag from Pages (or Word). Losing the format is a huge loss.

            Unfortunately, I don't have the luxury of being in an application sandbox.