About a month ago I saw a mail coming by where a colleague of mine had integrated the jQuery plug-in Codemirror into a text area for the end-user. I hadn’t seen this plug-in before, but I really liked the feel of it.
Since we can not change the APEX Application Builder, it would be nice to find another solution? And that solution exists: take a look at the following screenshots:
So how did I do it? A little “thinking outside the box” did the trick. While we might not want to mess with Apex directly, we can use browser Extensions and add-ons, to alter the looks, safely from a distance. So I created a small Chrome Extension that integrates CodeMirror into the APEX Text Areas.
Chrome Extensions are created with HTML5 and JS so once you have the basics of your Extension set up you can convert an Apex Text Area like this:
var vTextArea=document.getElementById(“F4000_P4312_PROCESS_SQL2″);
vMyEditor = CodeMirror.fromTextArea(vTextArea, {
mode: “text/x-plsql”,
tabMode: “indent”,
tabSize : 2,
lineNumbers: true,
firstLineNumber: 2,
lineWrapping: true
});
I wrapped this in a “$(document).ready(function(){});” to make sure it is executed after loading all plug-ins.
I hope I showed you all that you can do allot with a little imagination, and I welcome any questions or suggestions.
Joni Vandenberghe
Tags: Apex, CodeMirror, JQuery, oracle



October 22, 2012 at 8:15 am |
Hi Joni, take a look at the APEX Developer Addon by Peter Raganitsch. http://apex.oracle.com/pls/apex/f?p=APEX_DEVELOPER_ADDON:ABOUT:0
October 24, 2012 at 12:06 pm |
Looks like I’m not the only one who has done research in this subject! I will def check them out, thanks!
October 25, 2012 at 2:50 am |
Hi Joni,
thanks for mentioning Codemirror and the PL/SQL Enhancements.
See this Article for the APEX Developer Addon with Syntax Highlighting (and other Features): http://www.oracle-and-apex.com/apexlib-apex-developer-addon/
Peter