react-markdown-editor-lite icon indicating copy to clipboard operation
react-markdown-editor-lite copied to clipboard

Feature request: allow default view prop on initial render

Open code-angels opened this issue 5 years ago • 1 comments

Hi, great library and thanks for the support.

Would it be possible to allow a prop to render the default view?
The use case I have is that I want to render the 'text editor view only' on mobile by default.
I think that this makes sense as the side-by-side view on mobile isn't very attractive nor practical.

This may theoretically be achieved by writing a plugin and re-writing most of the logic in: https://github.com/HarryChen0506/react-markdown-editor-lite/blob/master/src/plugins/modeToggle.tsx

But personally I think that this is too much duplication and hassle fo functionality that the library already provides and does well.

code-angels avatar Jul 18 '20 11:07 code-angels

Use config.view

sylingd avatar Jul 19 '20 16:07 sylingd