sanity-io / sanity-plugin-markdown

Markdown support in the Sanity Studio
MIT License
51 stars 8 forks source link

Adding in Fullscreen using Sanity Portal #14

Closed jtomchak closed 3 years ago

jtomchak commented 3 years ago

Having the editor area be able to toggle full screen is a big quality of life improvement for our team when adding longer form content. I have seen several requests over in the past for this feature, so I wanted to share what I came up with with as little change as possible to the existing editor.

Appreciate everyone's input

Demo

evenwestvang commented 3 years ago

Thank you! We will have a look.

runeb commented 3 years ago

Thank you for your PR @jtomchak ! There seems to be an issue with the rendering of the fullscreen button. Perhaps there is a better way to add to the list of buttons in the toolbar?

Screenshot 2021-10-12 at 10 25 21
jtomchak commented 3 years ago

@runeb Yeah, the lib ReactMde has a preset list of toolbar buttons, so without heavy modification to that specific library, or creating a second 'sanity' specific toolbar above it. I couldn't get it in the ReactMde toolbar, so it's absolutely positioned to the top right of the container.

runeb commented 3 years ago

I don't think we can add the fullscreen button like this. Btw, I see that the ReactMde project has been archived so it may be time to look for a different editor for this plugin anyways.

jtomchak commented 3 years ago

No worries, thanks for looking through it. I agree it's probably time to swap out the mde editor for something else. Slate.js maybe?