-
Notifications
You must be signed in to change notification settings - Fork 111
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
Editor value does not show until click into? #20
Comments
What version of vue and webpack are you using? |
"vue": "^2.3.3" and "webpack": "2.2.1" |
https://f-loat.github.io/vue-simplemde/ |
No it does not. The issue on mine happened on a modal. |
Try to use |
Thank :) I will do it on Monday |
It says initialize() is undefined. |
You should modify markdown-editor.vue like this: mounted() {
// this.initialize();
}, and after the model show do this: this.$nextTick(() => {
this.$refs.markdownEditor.initialize();
}); |
I will solve the problem in the next release. |
Thank you. I actually have not resolved the issue yet. |
I think the modal is hidden or not exist at mounted hook, so markdownEditor init fail. Actually, it should init only when the first time show. |
same issue, maybe help. |
I'm having the same problem, any updates on this? |
Try to refresh editor after the modal show. this.simplemde.codemirror.refresh(); |
SimpleMDE's issue |
Thanks for the help @F-loat. I still have this issue, and unable to remedy it using any of the information posted here, or via upgrading to the newest version. I've tried researching the link you've provided in the last post, but it doesn't seem to link to anything. Is this issue resolved? How can I go about fixing it? Thank you for the help. |
The link is right now. Vue-simplemde is just a small wrapper of SimpleMDE and this issue should be SimpleMDE's. @burhanmt provided a solution in the last post of SimpleMDE#596 $("#application-modal").focus(function () {
simplemde.codemirror.refresh();
}); The snippet which is above is not working in Safari and Chrome. $('#modal_editarticle').on('shown.bs.modal', function () {
simplemde.codemirror.refresh();
}); it will work in all browsers. |
Yep, thanks I see that now. My mistake. I had Make a markdown component with a ref attribute My Show Dialog function to show the Modal with a simplemde component
whatever is in your ref attribute on your markdown component is swapped in Thanks for the help and super quick reply, @F-loat. Appreciate it. :) |
When I click to the edit button. The MakrdownEditor value changed to the right value, but not show on the editor. The text only show when I click into the editor form. How can I fix that?
Note: I had do configs set
autofocus: true
but nothing happenedThank you,
The text was updated successfully, but these errors were encountered: