<commit_before>## Bootstrap Floats for [Summernote WYSIWYG Editor](http://summernote.org/)

Replace (or extend) image popover buttons (using float: attributes) with a new set of buttons that inject proper Bootstrap classes (pull-right / pull-left / none) while keeping any other class in the image.

This not only keeps Bootstrap naming convention, but makes it much easier to style margins/paddings/etc on floated images, as you can just target the classes.

![Screenshot](screenshot.jpg?raw=true "Screenshot")

## Installation

First include ````summernote-floats-bs.js```` or it's minified version ````summernote-floats-bs.min.js```` after ````summernote````

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.1/summernote.min.js"></script>

<script src="summernote-floats-bs.min.js"></script>
```

## Usage

Then just initialize the toolbar replacing the float buttons ```( floatBSLeft / floatBSRight / floatBSNone )```

```js
$(document).ready(function() {
	$('#texto').summernote({
		lang: 'en-US',
		dialogsInBody: true,
		popover: {
			image: [
			['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],
			/* ['float', ['floatLeft', 'floatRight', 'floatNone']], */
			/* Those are the old regular float buttons */
			['floatBS', ['floatBSLeft', 'floatBSNone', 'floatBSRight']],
			/* Those come from the BS plugin, in any order, you can even keep both! */
			['remove', ['removeMedia']],
			],
		}
	});
});
```<commit_msg>Link to demo<commit_after>## Bootstrap Floats for [Summernote WYSIWYG Editor](http://summernote.org/)

Replace (or extend) image popover buttons (using float: attributes) with a new set of buttons that inject proper Bootstrap classes (pull-right / pull-left / none) while keeping any other class in the image.

This not only keeps Bootstrap naming convention, but makes it much easier to style margins/paddings/etc on floated images, as you can just target the classes.

You can try a demo at http://marcosbl.github.io/summernote-floats-bs/demo/

![Screenshot](screenshot.jpg?raw=true "Screenshot")

## Installation

First include ````summernote-floats-bs.js```` or it's minified version ````summernote-floats-bs.min.js```` after ````summernote````

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.1/summernote.min.js"></script>

<script src="summernote-floats-bs.min.js"></script>
```

## Usage

Then just initialize the toolbar replacing the float buttons ```( floatBSLeft / floatBSRight / floatBSNone )```

```js
$(document).ready(function() {
	$('#texto').summernote({
		lang: 'en-US',
		dialogsInBody: true,
		popover: {
			image: [
			['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],
			/* ['float', ['floatLeft', 'floatRight', 'floatNone']], */
			/* Those are the old regular float buttons */
			['floatBS', ['floatBSLeft', 'floatBSNone', 'floatBSRight']],
			/* Those come from the BS plugin, in any order, you can even keep both! */
			['remove', ['removeMedia']],
			],
		}
	});
});
```
{'fraction_non_alphanumeric': 0.17295690936106983, 'fraction_numerical': 0.00950965824665676, 'mean_word_length': 4.705084745762712, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4949572', 'n_tokens_mistral': 1187, 'n_tokens_neox': 1063, 'n_words': 293}