read-only or non-editable elements
See original GitHub issueIs it possible to set certain (but not all) text or math elements on a page to be read only? This would mean that they would be visible but not editable. For example, the MathQuill editor would not be launched when a read-only math element was focused. Can this be set in the state - something like the following maybe?
{type: "math", src: "y=a\sin\left(bx\right)", inline: false, readOnly: true, children: [{text: ""}]}
Or is there another way to do this?
Thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
HTML attribute: readonly - HTML: HyperText Markup Language
The Boolean readonly attribute, when present, makes the element not mutable, meaning the user can not edit the control.
Read more >readonly attribute of input and textarea elements
readonly attribute of input and textarea elements. - LS. Makes the form control non-editable. Unlike the disabled attribute, readonly form controls are ...
Read more >HTML readonly Attribute
The readonly attribute on an input element specifies that the element is read-only which means the element is non-editable. Readonly input elements are ......
Read more >HTML5 Forms: Readonly Type Attribute
The readonly attribute makes a form control non-editable (or “read only”). ... You can target elements that are read only with the :read-only...
Read more >Read-Only Input Elements vs. Non-Input Element [duplicate]
There's nothing wrong with using disabled inputs on a text or textarea type of input. It's part of the HTML5 specification, and most...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, basically:
packages/plugins/text
.packages/plugins/text/src/plugins/katex
with your functionality.Thanks for the info. I need to get my head around the codebase a bit more, I think, before attempting this. Should I be looking in the katex plugin to implement this? https://github.com/edtr-io/edtr-io/blob/master/packages/plugins/text/src/plugins/katex/index.tsx