CSS Bug in Editor Upload Field Using Bootstrap 4

CSS Bug in Editor Upload Field Using Bootstrap 4

Michael Todd GlazierMichael Todd Glazier Posts: 2Questions: 1Answers: 0

Per the title, the CSS for the Choose File and Clear File buttons are wrong. For example:

<button class="btn btn-default">Choose JPG...</button>

btn-default is not a valid Bootstrap 4 style.

I made it pretty with:

editor.on('open', function () {
    $('.upload button').addClass('btn-outline-primary btn-sm');
    $('.clearValue button').addClass('btn-outline-danger btn-sm');
  });

Replies

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin

    Thanks for pointing that out! Fixed for 1.8.1 which will be out soon :-). I've used btn btn-outline-secondary for both of the buttons for simplicity. The approach you've taken will still work to customise them.

    Allan

  • dt1 dt1 Posts: 52Questions: 5Answers: 0

    Hi,
    Could you please take a look again. It seems that form buttons are all coming with the btn-outline class as default why? (Editor 1.8.1)
    In the past it was btn-defualt

  • dt1 dt1 Posts: 52Questions: 5Answers: 0

    Hi,
    I have edited out the class btn-outline-secondary in the file:
    editor.bootstrap4.min.js

    to go back to the Editor 1.7.4 design

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin

    Sorry - just to confirm, are you talking about the upload button or the submit button? Editor 1.8.1 has:

    btn btn-outline-secondary btn-primary

    for the submit button.

    Regards,
    Allan

  • dt1 dt1 Posts: 52Questions: 5Answers: 0

    Submit and Close buttons.

This discussion has been closed.