hashmd icon indicating copy to clipboard operation
hashmd copied to clipboard

New Feature: Split pane resizer

Open curly210102 opened this issue 2 years ago • 3 comments

Demo Effect

2021-09-10 21 14 41

Why need this feature?

I'm working on develop a github markdown editor, but the preview pane is too crowd in Macbook 13 inch screen. It would be better if I can resize the split panes.

I have thought about wrapping bytemd with SplitPane components, but it's impossible to separate Editor and Preview but keep the sync scroll. Cannot use plugin API to achieve this feature. Finally, I try to built in this feature to Bytemd.

API

  • Add allowResize: boolean to editor options, default value is false

curly210102 avatar Sep 10 '21 14:09 curly210102

Looks neat!

Could you also add this option to the demo here, so it can be previewed at https://bytemd.netlify.app/

pd4d10 avatar Feb 04 '22 11:02 pd4d10

@pd4d10

Looks neat!

Could you also add this option to the demo here, so it can be previewed at https://bytemd.netlify.app/

DONE!

curly210102 avatar Feb 09 '22 15:02 curly210102

Sorry for the late response.

Have seen the effect at https://deploy-preview-123--bytemd.netlify.app/, great!

I think we may have a few more things to consider, to move this forward

  • The border disappears after enabling this option. Seems to be a minor bug
  • Shall we save the resize position? I guess users who have the resize needs would not like to resize it again and again. But if we save it, for example, in the localStorage, it would be some kind of side effects.

I'm not sure, what do you think?

pd4d10 avatar Dec 10 '22 06:12 pd4d10