Open paulocheque opened 8 years ago
This should be possible with minimal use of the API. You would just make another empty div and on editor update you update the div contents
It worked perfectly! Thanks!
Actually this solution is a hack, right? This solution worked for me, but the preview' style does not work because we are not using the preview iframe anymore. So I have to create a new style for that. So all the documentation about themes does not work for this scenario.
Well, actually this solution works but it has performance problems when the text is extensive. I will check what is the solution in the fullscreen mode.
One of the reasons of the bad performance is the following code:
// Even if autoSave is false, we want to make sure to keep the textarea synced
// with the editor's content. One bad thing about this tho is that we're
// creating two timers now in some configurations. We keep the textarea synced
// by saving and opening the textarea content from the draft file storage.
self._textareaSaveTimer = window.setInterval(function () {
if (!self._canSave) {
return;
}
self.save(true);
}, 100);
Well, actually I was able to solve the performance problems with a debounce strategy during the preview update!
Is that possible? I believe the fullscreen mode should be independent of the live_preview mode.
We could have fullscreen only for edition, and non-fullscreen with live_preview.