Version 5.0.6

This commit is contained in:
Neo committed 2025-12-19 18:55:49 -08:00
1 parent a3a4a9ccbd
commit b89858b2ff
1214 files changed
+92828 -14859

No files matched your search

+14
View File
@@ -113,6 +113,20 @@ class Codemirror extends TextArea
{
if( $this->options['simple'] )
{
if ( isset( $this->options['mode'] ) )
{
if ( empty( $this->options['codeModeAllowedLanguages'] ) )
{
$this->options['codeModeAllowedLanguages'] = [];
}
$this->options['codeModeAllowedLanguages'][] = $this->options['mode'];
}
if ( is_array( $this->options['codeModeAllowedLanguages'] ) )
{
// HTMLMixed is not a valid option for Monaco
$this->options['codeModeAllowedLanguages'] = array_unique( array_map( function ($lang) { return $lang === 'htmlmixed' ? 'html' : $lang; }, $this->options['codeModeAllowedLanguages'] ) );
}
return parent::html();
}