Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
 public async Task <IActionResult> Post([FromBody] PasteRequest paste)
 {
     return(Content(await Store(paste.Content)));
 }