Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If not editable, the table plugin should be turned off #53

Closed
rowanc1 opened this issue Sep 21, 2021 · 7 comments
Closed

If not editable, the table plugin should be turned off #53

rowanc1 opened this issue Sep 21, 2021 · 7 comments
Assignees

Comments

@rowanc1
Copy link
Member

rowanc1 commented Sep 21, 2021

Right now in read only you can still edit the width and the selection of cells is unnexpected

@Yxwww
Copy link
Contributor

Yxwww commented Sep 21, 2021

Looks like we can utilize state.reconfigure method to toggle plugins at runtime. https://prosemirror.net/docs/ref/#state.EditorState.reconfigure

@Yxwww
Copy link
Contributor

Yxwww commented Sep 22, 2021

Wonder if cell selection is still useful for "reading" mode ?

@rowanc1
Copy link
Member Author

rowanc1 commented Sep 22, 2021

I did notice that you can select the cells and copy them over to a spreadsheet easily, so leaving that one active could be good!

@rowanc1
Copy link
Member Author

rowanc1 commented Sep 22, 2021

Adding an editing toggle to the demo would be fantastic.

@Yxwww Yxwww self-assigned this Sep 22, 2021
@Yxwww
Copy link
Contributor

Yxwww commented Sep 22, 2021

Adding an editing toggle to the demo would be fantastic.

Since we already have a <EditorMenu />, we can add the readonly mode switch there. We can use a prop to toggle to hide it. 🤔

@Yxwww
Copy link
Contributor

Yxwww commented Sep 22, 2021

We can start with a demo menu and bring in functionality to EditorMenu if it fits.

@rowanc1
Copy link
Member Author

rowanc1 commented Sep 22, 2021

Can you add the switch outside of the menu! The menu is used as is in downstream components, and this isn't something desirable. Can you add it to the index.ts in the demo?

@rowanc1 rowanc1 closed this as completed Oct 13, 2021
rowanc1 added a commit that referenced this issue Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants