It's possible to edit code in syntaxhighlight blocks with VE, but any changes are lost on save. To reproduce:
- Create a page using the wikitext editor with the following content:
<syntaxhighlight lang="javascript"> var foo = bar; </syntaxhighlight>
- Save the page.
- Edit the page in VE, and change "bar" to "baz". Also add a word or two after the syntaxhighlight block so that there will be a difference from the current revision. (I chose 'Changed "bar" to "baz".')
- Save the page. In the saved page, "baz" has changed back to "bar".
- If you edit again in the wikitext editor, the content is this:
<syntaxhighlight lang="javascript"> var foo = bar; </syntaxhighlight>Changed "bar" to "baz".
I appreciate that SyntaxHighlight support is being worked upon, and that this problem will probably be solved when the work is finished. However, in the meantime it's probably best to disable editing of SyntaxHighlight blocks to prevent users losing work unnecessarily.