Class ClipboardHelper

Helper to encode and set HTML fragment to clipboard.
See
MarkdownMonster.ClipboardHelper.CreateDataObject(System.String,System.String).

System.Object
  MarkdownMonster.ClipboardHelper
public static class ClipboardHelper : object

Remarks

The MIT License (MIT) Copyright (c) 2014 Arthur Teplitzki. https://gist.github.com/ArthurHub/10729205

Class Members

MemberDescription

EndFragment

html comment to point the end of html fragment

StartFragment

html comment to point the beginning of html fragment

ContainsImage

Safe way to retrieve whether clipboard contains an image

public static bool ContainsImage()

ContainsText

Safe way to retrieve whether clipboard contains an image

public static bool ContainsText()

CopyHtmlToClipboard

Clears clipboard and sets the given HTML and plain text fragment to the clipboard, providing additional meta-information for HTML.
See MarkdownMonster.ClipboardHelper.CreateDataObject(System.String,System.String) for HTML fragment details.

public static bool CopyHtmlToClipboard(string html,     string plainText,     bool showStatusError)

CreateDataObject

Create System.Windows.DataObject with given html and plain-text ready to be used for clipboard or drag and drop.
Handle missing ]]> tags, specified startend segments and Unicode characters.

public static DataObject CreateDataObject(string html,     string plainText)

GetHtmlFromClipboard

Returns the raw HTML of HTML content on the clipboard. Unlike GetText() this method returns the rendered HTML rather than the innerText of the HTML content.

public static string GetHtmlFromClipboard()

SetText

Safely sets the clipboard and optionally displays a status error message

public static bool SetText(string text,     bool showStatusError)

Requirements

Namespace: MarkdownMonster
Assembly: markdownmonster.exe

See also:

MarkdownMonster.ClipboardHelper.CreateDataObject(System.String,System.String)

© West Wind Technologies, 2019 • Updated: 01/06/19
Comment or report problem with topic