clipboard issues anyone?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

clipboard issues anyone?

This is done in 2.7.4 on windowsxp.

When you copy paste from the script editor into any html compliant editor,
you get Paragraph marks instead of line breaks.

To fix this I made this little script which I run after any copy command.

But I ran into confusion when it didn't work...

so I copy "styled" text using the "copy" command and call this handler to
fix the html but it doesn't work the way you would expect.

on FixClipboardHTML
  local c
  get the clipboard -- only contains TEXT!
  put the clipboarddata["HTML"] into c
  -- c is not empty contrary to what the clipboard function may say!
  get the clipboarddata["HTMLText"] -- empty contrary to documentation and
c's content
  if c is not empty and "</p>" is in c then
    replace "</p>" with "" in c
    replace "<p>" with "<BR>" in c
    set the clipboarddata["HTML"] to c -- seems to work and the result is
    get the clipboarddata["HTMLtext"] -- still empty!
    get the clipboarddata["HTML"] -- but wait, there's absoluty no sign of
replacements done!!!
  end if
end FixClipboardHTML

Any work-arounds welcome...


use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences: