You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should change the toolbar icons depending on whether the page is in edit or preview mode.
Two things should be done here:
Figure out if there is a way to immediately open the editor in preview mode. (Currently we do this by manually invoking togglePreview() after the editor has initialized itself in edit mode)
Figure out if the editor can be configured to automatically change the icons based on mode.
If it can't be configured to automatically change, then we need to implement it ourselves:
First we should see whether Inscryb/inscryb-markdown-editor#17 is a bug or not. That is, whether we can easily test whether the editor is in preview mode or not.
Then, one option (possibly not very favorable) would be to destroy the toolbar and create it anew with different icons when mode is changed. We have a prototype of this working, but it currently does not properly create a toolbar when editor is in full screen mode (this is probably another bug in SimpleMDE/InscrybMDE).
Another option (not tested yet) would be to modify the toolbarComponents array to take out and bring back individual icons when mode is changed. Hopefully the editor.render() method would work correctly and we'd have no other work than just adding or removing toolbar objects from that array.
The text was updated successfully, but these errors were encountered:
We should change the toolbar icons depending on whether the page is in edit or preview mode.
Two things should be done here:
Figure out if there is a way to immediately open the editor in preview mode. (Currently we do this by manually invoking togglePreview() after the editor has initialized itself in edit mode)
Figure out if the editor can be configured to automatically change the icons based on mode.
If it can't be configured to automatically change, then we need to implement it ourselves:
First we should see whether Inscryb/inscryb-markdown-editor#17 is a bug or not. That is, whether we can easily test whether the editor is in preview mode or not.
Then, one option (possibly not very favorable) would be to destroy the toolbar and create it anew with different icons when mode is changed. We have a prototype of this working, but it currently does not properly create a toolbar when editor is in full screen mode (this is probably another bug in SimpleMDE/InscrybMDE).
Another option (not tested yet) would be to modify the toolbarComponents array to take out and bring back individual icons when mode is changed. Hopefully the editor.render() method would work correctly and we'd have no other work than just adding or removing toolbar objects from that array.
The text was updated successfully, but these errors were encountered: