APEX (21.2+) Plugin built by using Code Mirror JavaScript Library (version 5.64.0).
Import plugin file item_type_plugin_com_apexbyg_blogspot_codemirror.sql
(Optional) To optimize performance upload static files (CSS and JS) from server/nitro/dist directory to Webserver and change File Prefix to point on server directory
(Optional) Compile package pck_code_editor_plugin (from source directory) in DB schema (available to APEX parsing schema) and change parameter Render Procedure/Function Name to pck_code_editor_plugin.p_render
You can set height dynamicall by running:
apex.item('P2_EDITOR').callbacks.setHeight('500');
where P2_EDITOR is static ID of the plugin item.
The value can be number (in pixels), 'auto' or number with percentage.
apex.item('P2_EDITOR').callbacks.setHeight('500');
apex.item('P2_EDITOR').callbacks.setHeight('100%');
apex.item('P2_EDITOR').callbacks.setHeight('auto');
You can also set height with CSS:
#P2_EDITOR_CONTAINER .CodeMirror{
height:800px
}
where P2_EDITOR is static ID of the plugin item.
Plugin is still in Beta version supporting only PL/SQL syntax highlighting.
You can also find older APEX versions of the plugin in source directory but it's not upgraded from version 1.0.0.
Demo is available here.