refactory-id / bootstrap-markdown

Bootstrap plugin for markdown editing
Apache License 2.0
1.99k stars 371 forks source link

Change some style that supported by Bootstrap 4 #296

Open waggyman opened 6 years ago

waggyman commented 6 years ago

I create this Pull Request because there are some styles that not supported by bootstrap-4. I Found it when use this lib on my project :smile: This is based on #213

Fixes:

lodev09 commented 6 years ago

does this affect BS3?

waggyman commented 6 years ago

Yes of course, in BS4 btn-default is replaced by btn-secondary and in BS4 glyph is not supported again, so I change the default icon to font-awesome. Do you mind if I add font-awesome in bower.json?

lodev09 commented 6 years ago

I meant what will happen for those who are still in BS3? We want to support BS4 but we don't want to ditch BS3 support e.g. by changing btn-default to btn-secondary.

Perhaps I'm missing something? @acrobat any thoughts?

waggyman commented 6 years ago

Okay I add the btn-default again, I test it in my project again, and luckily it is not problem if we make the class like this

<button class="btn-default btn-secondary btn-sm">

I have try it use BS3 and BS4 and it work like this:

This is the pict when I use BS3

use BS3


And this one when I use BS4

image

toopay commented 6 years ago

Thanks @awebr000 ! @lodev09 @acrobat Thought on this? I think i'm gonna start to split the development branches into v2.x and this can be a baseline for v3.x branch - which happens to be a master at this point.

lodev09 commented 6 years ago

@toopay yep I think that's the best way to handle the new bootstrap 4 like you did on previous versions :)

buuug7 commented 6 years ago

@toopay where is toopay? i can't wait this for bs4 , git new branch bs4 for this feature

stramel commented 6 years ago

Bs4 beta was dropped a few hours ago

bnymn commented 6 years ago

Preview option does not work, is it just me?

niknokseyer commented 6 years ago

This looks good. Will try to pull and test this one.

ghiscoding commented 5 years ago

A bit late on the show, but here are some thought.

@waggyman @lodev09 If you want to support BS3 and BS4 (which you should since a lot of us didn't switch yet), then you shouldn't delete the glyph icons completely, as can be seen on this line. I agree to change the default to "fa" but removing the glyph icon names entirely is a mistake since it could break some people's editor if they choose to keep the glyph as their default. Also, your bower file is quite outdated now on the dependencies side of it "bootstrap": "v4.0.0-alpha.6"

@niknokseyer I saw the "Preview" as broken too, then I found here that we can replace the parser with our own and that is what I did to fix mine.

$('textarea').markdown({
  parser: convertFunction, // or whatever
});
roipoussiere commented 5 years ago

Any news here? I'm also interested by the bs4 support, is there something missing to merge this?