How to set http://prefix in the iframe button

Jul 8, 2015 at 12:57 AM
Edited Jul 8, 2015 at 6:41 PM
Many users uses the iframe button without specifying "http://" prefix in the url address.

The url saved in this way not works fine in the blog module.

It's possible to set automatically the value of the URL field with "http://" ?
Coordinator
Jul 9, 2015 at 8:08 AM
Yes it is possible similar to the _blank solution replace the java script code in your custom js file with this one...
CKEDITOR.on('dialogDefinition', function(ev) {

    try {

        var dialogName = ev.data.name;
        var dialogDefinition = ev.data.definition;

        if (dialogName == 'link') {
            var informationTab = dialogDefinition.getContents('target');
            var targetField = informationTab.get('linkTargetType');

            targetField['default'] = '_blank';
        }

        if (dialogName == 'iframe') {
            var infoTab = dialogDefinition.getContents('info');
            var srcField = infoTab.get('src');

            srcField['default'] = 'http://';
        }

    } catch (exception) {
        alert('Error ' + ev.message);
    }

});