You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone.
What I've been trying to do is embedding a custom syntax "Prisma Schema" in this code <Editor height="100vh" width="50vw" language="prisma" theme="light" loading="Loading..." path="schema.prisma" options={{ domReadOnly: true, minimap: { enabled: false }, smoothScrolling: true, scrollBeyondLastLine: true, glyphMargin: true, }} value={prismaSchema} />
and everytime user tries to do some action (outside the Editor component): a state called prismaSchema updates and therefore the content of that editor change, and of course a user may make some typo and a syntax error marker should appear which I managed to make so. I want these error to appear and the <Editor /> component is on readOnly option but that doesn't seem to be working, any idea why?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone.
What I've been trying to do is embedding a custom syntax "Prisma Schema" in this code
<Editor height="100vh" width="50vw" language="prisma" theme="light" loading="Loading..." path="schema.prisma" options={{ domReadOnly: true, minimap: { enabled: false }, smoothScrolling: true, scrollBeyondLastLine: true, glyphMargin: true, }} value={prismaSchema} />
and everytime user tries to do some action (outside the Editor component): a state called
prismaSchema
updates and therefore the content of that editor change, and of course a user may make some typo and a syntax error marker should appear which I managed to make so. I want these error to appear and the<Editor />
component is onreadOnly
option but that doesn't seem to be working, any idea why?Beta Was this translation helpful? Give feedback.
All reactions