To capture all external links in your application and open them in a separate browsertab - or on mobile in your browser app - you can use this script. It's basically the same as suggested in the SO thread, but based on dojo instead of jquery.
require(["dojo/dom-attr", "dojo/on", "dojo/domReady!"], function(domAttr, on) {
if(!window.device) {
window.device = { platform: 'browser' };
}
if(!window.extLinksHandler) {
on(document, 'a[href^="http"]:click', function(e) {
e.preventDefault();
var url = domAttr.get(e.target, 'href');
if(device.platform.toLowerCase() === 'android' || device.platform.toLowerCase() === 'ios') {
window.open(url, '_system');
} else
window.open(url, '_blank');
});
window.extLinksHandler = true;
}
});
To be honest I'm not too familiar with the CKEditor. Normally, you solve this by setting the target of the link to _blank, this will tell the operating system to open it in a new browser instead of the existing app.
The top answer in this SO thread is the standard PhoneGap solution. I'm guessing you could modify CKEditor to create HTML like this for links instead of a normal link. The same solution should also work on desktop browsers, as you're just using the JavaScript window.open function.