Excalicharts MVP (#1723)

Co-authored-by: David Luzar <luzar.david@gmail.com>
This commit is contained in:
Pete Hunt 2020-06-06 13:09:04 -07:00 committed by GitHub
parent d1be2a5481
commit f7c4efbd35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 288 additions and 2 deletions

View file

@ -707,8 +707,15 @@ class App extends React.Component<any, AppState> {
) {
return;
}
const data = await getClipboardContent(event);
if (data.elements) {
const data = await getClipboardContent(
this.state,
cursorX,
cursorY,
event,
);
if (data.error) {
alert(data.error);
} else if (data.elements) {
this.addElementsFromPaste(data.elements);
} else if (data.text) {
this.addTextFromPaste(data.text);