Open gquintana opened 7 years ago
Is this happening with Live Preview activated, or just with the raw AsciiDoc view @gquintana ?
I know that the Live Preview would trigger a view refresh as asciidoctor.js re-rendered the file. But I wouldn't expect it to re-trigger the render when the live preview was hidden.
@jaredmorgs No includes are reloaded even if preview panel is hidden. Yet, I found a workaround setting config.meta.delay
to 10s or more: it slows down to a refresh every 10s, this makes online post editor usable again.
https://github.com/HubPress/hubpress.io/blob/development/src/hubpress/scripts/components/Post.react.js#L64
I'd say that @anthonny needs to disconnect the editor pane refresh from the live preview refresh.
Also, I'd recommend that you update to 0.7.0 and see if the problem persists. Could you confirm here once you've updated if the include
macros still cause the editor pane lag.
Thanks for your help with testing this for us. 👍
This a bit more complex that just a refresh.
I explain:
Each time you change the content of your post, a conversion in HTML is made by asciidoctor and the result is save in the pouchdb database. This content is use when you publish your post.
If you set the delay to 10 second, the editor will wait 10 second before generate the HTML content. If you close the editor at 9sec, the HTML will not be generated and not save so you will lose your content.
IMHO the best thing to do is to cache the ajax call for X second
The scenario: