public static ICommand RequestPaste(this IEditor editor, Point location, string description) { var req = new PasteRequest(); req.Location = location; req.Description = description; return(editor.PerformRequest(req)); }
public void DoPaste(EditorCanvas editorCanvas) { if (editorCanvas == null) { return; } if (editorCanvas.FocusManager.IsEditorFocused) { var focus = editorCanvas.FocusManager.Focus as StyledTextFocus; if (focus != null) { focus.PasteInlinesOrText(false); } } else if (editorCanvas.CanPaste()) { var selecteds = editorCanvas.SelectionManager.SelectedEditors; var bundle = new EditorBundle(selecteds); var req = new PasteRequest(); req.Location = editorCanvas.Caret.Position; bundle.PerformCompositeRequest(req, editorCanvas.CommandExecutor); } }
public async Task <IActionResult> Post([FromBody] PasteRequest paste) { return(Content(await Store(paste.Content))); }