mgoricki / apex-plugin-code-editor

APEX Plugin - Code Editor (CodeMirror)
MIT License
8 stars 0 forks source link

APEX Code Editor Plugin

APEX (21.2+) Plugin built by using Code Mirror JavaScript Library (version 5.64.0).

Features

Changelog

Install

Settings

Set Height

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.

Notes

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

Demo is available here.