Editor Bootstrap styles for inputs

Editor Bootstrap styles for inputs

sliekenssliekens Posts: 97Questions: 17Answers: 2

In editor.bootstrap.js, the code adds CSS class form-control to inputs with type="text" but not other inputs like email/password/number/....

Replace:

// For each instance we need to know when it is opened
dte.on( 'open.dtebs', function ( e, type ) {
    if ( type === 'inline' || type === 'bubble' ) {
        $('div.DTE input[type=text], div.DTE select, div.DTE textarea').addClass( 'form-control' );
    }
} );

Replace with:

// For each instance we need to know when it is opened
dte.on( 'open.dtebs', function ( e, type ) {
    if ( type === 'inline' || type === 'bubble' ) {
        $('div.DTE input:not([type=checkbox]):not([type=radio]), div.DTE select, div.DTE textarea').addClass( 'form-control' );
    }
} );

Replies

  • allanallan Posts: 61,431Questions: 1Answers: 10,048 Site admin

    Thanks! I had thought it did that already, but obviously not. I'll have it fixed in 1.6.2.

    Allan

This discussion has been closed.