Allow html fragments without html and body tags

When there is no html and body tags, html and body tags will be forced to be inserted. I hope to allow this feature to be disabled to facilitate writing html fragments.

How can i do this?

That’s not something CodeMirror does. The browser will do that, though, if you let it parse a page without those tags.

1 Like

Thanks for the reply, although it’s not related to the point you said, but I found the reason, thank you.