Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active September 30, 2015 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/5a3c5bf3eba0096c91ff to your computer and use it in GitHub Desktop.
Save bjoerntx/5a3c5bf3eba0096c91ff to your computer and use it in GitHub Desktop.
// save the selection as RTF text
string sRTFSelection = "";
TextControl1.Selection.Save(out sRTFSelection,
TXTextControl.Web.StringStreamType.RichTextFormat);
// fill the hidden textbox with the RTF string
TextBox1.Text = sRTFSelection;
// call the attachZeroClipboard() function to update ZeroClipboard
System.Web.UI.ScriptManager.RegisterClientScriptBlock(
this, this.GetType(),
"CallAttachZeroClipboard",
"attachZeroClipboard(); toggleClipboardDropDown();", true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment