I looked through the topics here and couldn’t find anything related. Using codemirror/next to build a code editor with JSX support (among others) and I noticed the indentation when you hit Enter is different than in the case of an editor based on HTML.
vs HTML Setup
For the JSX code, it doesn’t matter how indented the tags are, the cursor will be placed inline with the first JSX tag. Is this intended behavior? is there an easy way to correct this behavior? I tried re-implementing the
insertNewLineAndIndent function but didn’t get to a solid solution. As far as I understand it, this functions should compute the indentation level of the current line and use that for the newly inserted one.