How to use the ghost/assets/lib/touch-editor function in ghost

To help you get started, we’ve selected a few ghost examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TryGhost / Ghost-Admin / app / utils / codemirror-mobile.js View on Github external
init = function init() {
    // Codemirror does not function on mobile devices, or on any iDevice
    if (device.mobile() || (device.tablet() && device.ios())) {
        $('body').addClass('touch-editor');

        Ember.touchEditor = true;

        // initialize FastClick to remove touch delays
        Ember.run.scheduleOnce('afterRender', null, function () {
            FastClick.attach(document.body);
        });

        TouchEditor = createTouchEditor();
        setupMobileCodeMirror();
    }
};
github TryGhost / Ghost-Admin / utils / codemirror-mobile.js View on Github external
init = function init() {
    // Codemirror does not function on mobile devices, or on any iDevice
    if (device.mobile() || (device.tablet() && device.ios())) {
        $('body').addClass('touch-editor');

        Ember.touchEditor = true;

        // initialize FastClick to remove touch delays
        Ember.run.scheduleOnce('afterRender', null, function () {
            FastClick.attach(document.body);
        });

        TouchEditor = createTouchEditor();
        setupMobileCodeMirror();
    }
};