The wicket codemirror component integrations provides a behavior for textareas.
The artifacts are available from jcenter.
compile group: 'com.thorstenmarx.wicket', name: 'codemirror', version: '0.3.0'
Use the codemirror behavior in your wicket code.
// create settings instance CodemirrorSettings settings = new CodemirrorSettings(); // select theme settings.setTheme(Theme.base16_dark); // select mode settings.setMode(Mode.XML); // add to textarea textArea.add(new CodemirrorBehavior(settings));