-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
#382 Read only text mode. #383
Conversation
Thanks Walker, looks good! Two remarks:
|
I agree with you, using |
Okay, I can take a look into supporting read only |
So that should allow the There was a moment where I could't decide which styling was most appropriate:
Would you be interested in adding lint rules and eslint to enforce style guides outlined in the contributing doc? I can spin off a new feature and associated PR. |
Rebased the upstream develop branch. |
Thanks, looks good! Reminder to myself: add a sentence about that you can use |
As for the styling: I tend to use the styling you used in the PR too lately. A linter would be welcome! Would be nice if you could set that up that for jsoneditor, thanks beforehand. |
Addresses #382. I have also added an example file in addition to the changes in
./src
. I didn't want to make the surface area ofoptions
any larger, so I decided to useonEditable
to determine if the textarea intext
mode is editable. If theonEditable
key is absent in theoptions
than the content is editable. If the key is present and has a value that is a function, it will determine whether the text area is editable based on the result ofonEditable
's invocation.If hijacking the
onEditable
option is not appropriate I'd love to chat about the desired api ofoptions
.