Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image upload along with drag and drop #416

Closed
roshan521 opened this issue Jul 7, 2022 · 3 comments
Closed

Image upload along with drag and drop #416

roshan521 opened this issue Jul 7, 2022 · 3 comments

Comments

@roshan521
Copy link

I don't see any props or command to work with images. Can you guide us?

@jaywcjlove
Copy link
Member

This needs to interact with the backend. You need to implement this yourself.
@roshan521

@roshan521
Copy link
Author

I have made backend api to store img I need to know how to change it into markdown and insert it into text editor

@jaywcjlove
Copy link
Member

@roshan521

execute: (state: TextState, api: TextAreaTextApi) => {
api.replaceSelection(`${state.selectedText}\n\n----------\n\n`);
},

class TextAreaTextApi {
textArea: HTMLTextAreaElement;
constructor(textArea: HTMLTextAreaElement) {
this.textArea = textArea;
}

useImperativeHandle(ref, () => ({ ...state }));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants