-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 not loading any content until its clicked or focused. #596
Comments
I also have this issue, and using the settimeout workaround as suggested on issue 344 has not worked for me (tested on multiple browsers). Edit: using version 1.11.2 |
@wkeifenheim Hey I actually got it working. If you are still interested I can explain what I did. |
Yes, please |
My Issue: I am using a modal and inside the modal is the editor. If the editor is in a regular page, it works perfectly fine. Content is loaded when page is loaded and you don't have to click it to make it appear. When using a modal, it does not appear when loaded and need to be at least clicked or focused. So what is the problem? Well the editor does not refresh when modal opens so what I did is i checked if the modal is focused. If the modal is focused, refresh the editor. This is the code that I used.
I use the 'each' function just in case I need to use the script to other pages with two text areas. This will work if you put this in your script page. Ask me more questions and I am happy to help. I got stuck here for a good week but now its working perfectly fine now. #application-modal is my modal id. |
did it work
…On Tue, Jun 20, 2017 at 10:02 AM, Woodrow Keifenheim < ***@***.***> wrote:
Yes, please
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#596 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AcGfM1NJ7tTDYupZJAAOcMfnXOczcT1Zks5sF97sgaJpZM4N8c6F>
.
|
@boomtothemoon |
@boomtothemoon How are settings the value if you don't know what the variable for each individual editor is? I have a bootstrap modal with the editor in and using AJAX to gather the items data and I want to input it into the editor, however tried into the linked texture but no success |
@boomtothemoon yep your solution is working... |
$("#application-modal").focus(function () { But if I change the code like that:
it will work in all browsers. |
Perhaps the autorefresh addon can be added to solve this in a more general case? See here: http://codemirror.net/doc/manual.html#addon_autorefresh. Although this issue only appears for me in Safari. |
For others browser (chrome, ...)
|
I am using a modal with editor inside. For some reason, when I am editing any content, it wont show any until its clicked. The issues been there before but really there is no clear solution. Please help?
The text was updated successfully, but these errors were encountered: