kaaaaaaaaaaai / editorjs-button

button plugin for Editor.js
MIT License
25 stars 16 forks source link

Style conflict in application using bootstrap #2

Closed wutsi closed 3 years ago

wutsi commented 3 years ago

When I use editorjs-button in a project using bootstrap, the layout of other buttons. Looks like editorjs-button is modifying the style of the class btn. Instead, can editorjs-button us as class something like ejs-btn and ejs-btn--primary?

kaaaaaaaaaaai commented 3 years ago

thankyou, i will fix it~

kaaaaaaaaaaai commented 3 years ago

@wutsi

hi, i confirming styling code,

i had prepared editing css class, :)

example in editorjs code

tools: {
        AnyButton: {
          class: AnyButton,
          inlineToolbar: false,
          config:{
            css:{
              btn:"ejs-btn"
            }
          }
        },
      },

the css class that can be set are

const _CSS = {
            baseClass: this.api.styles.block,
            hide: "hide",
            btn: "btn",
            container: "anyButtonContainer",
            input: "anyButtonContainer__input",
            inputHolder: "anyButtonContainer__inputHolder",
            inputText: "anyButtonContainer__input--text",
            inputLink: "anyButtonContainer__input--link",
            registButton: "anyButtonContainer__registerButton",
            anyButtonHolder: "anyButtonContainer__anyButtonHolder",
            btnColor: "btn--default",
            toggleSwitch: "toggle-switch",
            toggleInput: "toggle-input",
            toggleLabel: "toggle-label",
        }

counld you write comment if u have any problems at css class

wutsi commented 3 years ago

looks good to me

wutsi commented 3 years ago

@kaaaaaaaaaaai has is been deployed?

kaaaaaaaaaaai commented 3 years ago

@wutsi its already deployed, in v1.0.3 does it not work?

wutsi commented 3 years ago

@kaaaaaaaaaaai did you increment the version of the js file after the fix?

wutsi commented 3 years ago

Still doesn't work ! The class of the link is set, but the class in the