Has anyone been able to get "copy to clipboard" working - with
Firefox. I tried and firefox just closes the tiddler.
If you have some thoughts on how to debug this, I would appreciate
it. Here is the tiddler I used to test the functionality.
Thanks for looking at it.
Cheers; 'best,
shankar swamy
----------------------------------------------------------------------------------------------------------------------
<script>
var $ = jQuery;
var MyGlobalForm = $("<form />").submit(onSubmit);
var ta_1 = "<textarea id='textarea-1' name='textarea-1' rows=10
cols=78 />";
function AddTextInputs()
{
MyGlobalForm.
append(ta_1).
append("<p/>").
append('<input type="submit" value="Generate Text" width=80 /
>').
append("<p/>").
appendTo(".tiddler");
};
function InitGUI(){ AddTextInputs(); };
function GlobalInit(){ $("#textarea-1").val("Init String here!"); }
// handler to process input
function onSubmit() {
var form = $(this).closest("form");
var generatedText = "THis is the generated Text!";
$("#textarea-1").val(generatedText);
$("#textarea-1").focus();
$("#textarea-1").select();
// Copy this text to the clipboard:
window.clipboardData.setData(generatedText, text);
return false;
};
// generate UI
InitGUI();
GlobalInit();
</script>
--------------------------------------------------------------------------------------------------------------------------
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywikidev?hl=en.