fixed readonly property of code-editor#2967
fixed readonly property of code-editor#2967anishagg17 wants to merge 4 commits intoelastic:masterfrom
Conversation
|
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
|
This doesn't seem to fix the problem described in the ticket (Notice, there's still no react-ace isn't the most accessible thing so there isn't an API to do this, we have to mutate the dom after render to do this. (Kibana example, though I did mess up a little, the value of |
|
Fixed it, by updating ace to 8.0.0. |
myasonik
left a comment
There was a problem hiding this comment.
Great, I can see that readonly is now applied!
|
jenkins test this |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_2967/ |
thompsongl
left a comment
There was a problem hiding this comment.
I think it's a combination of the react-ace version update and the removal of brace from its deps, but syntax validation no longer occurs (compare https://eui.elastic.co/#/forms/code-editor to https://eui.elastic.co/pr_2967/#/forms/code-editor)
It's possible swapping the brace import statements for ace-build imports will solve it, but that may constitute a breaking change for consumers. Was a readOnly feature the reason for the version update, or can we continue to use react-ace@7.x and reinstate the brace imports?
|
Without updating |
|
@myasonik I am trying to restore highlighting |
|
@thompsongl I have fixed syntax validation ,highlight |
|
we should go with newer version as it major part was |
|
We'll need to label this as a breaking change because of the |
|
It's been too long since I've looked into the differences in the various ace packages, so I don't know what I may be mis-attributing to another package, and we'd need a full exploration of these changes to know. Another option, given:
is related to #2961 where we're already exploring dynamic attribution setting after mount |
|
Maybe we just do this as a post-render update and table the package update until we can do a full test that it doesn't break anything |
|
Right, I think I'd prefer avoiding the package update if we're planning on supplementing attributes anyway. |
|
Closing this in favor of post-render, dynamic attribute supplementation (see #2961) |


Summary
Fixes : #2960
fixed readonly property of code-editor
reference : https://github.com/securingsincity/react-ace/blob/master/docs/Ace.md
readOnly should be passed directly to the ace-editor instead of an option as suggested by the documentation
Checklist