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

Trigger focus #96

Open
hschhhwwwo0o opened this issue Feb 7, 2024 · 1 comment
Open

Trigger focus #96

hschhhwwwo0o opened this issue Feb 7, 2024 · 1 comment

Comments

@hschhhwwwo0o
Copy link

How do I call the focus method? Please show a sample code

@janwirth
Copy link
Owner

janwirth commented Feb 8, 2024

I can not write this code for you, but:

You can see here, that you can access the MediumEditor instance through the api prop on the component:
https://github.com/janwirth/vue-medium-editor/blob/master/interactive.js#L35C1-L36C1

This is how you access a prop on a component:
https://stackoverflow.com/a/37521683/3934396

Here seems to be someone that already did manage to programmatically focus the medium editor element:
yabwe/medium-editor#850 (comment)

good luck!

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