Code syntax highlighting doesn't work in Editor mode. Page must be published to see the highlighted syntax.
Allow syntax to get highlighted in Edit mode to make it more readable while writing any technical documentation.