<commit_before>'use strict';

/*
Usage: <wysiwyg textarea-id="question" textarea-class="form-control"  textarea-height="80px" textarea-name="textareaQuestion" textarea-required ng-model="question.question" enable-bootstrap-title="true"></wysiwyg>
	options
		textarea-id 			The id to assign to the editable div
		textarea-class			The class(es) to assign to the the editable div
		textarea-height			If not specified in a text-area class then the hight of the editable div (default: 80px)
		textarea-name			The name attribute of the editable div 
		textarea-required		HTML/AngularJS required validation
		ng-model				The angular data model
		enable-bootstrap-title	True/False whether or not to show the button hover title styled with bootstrap	

Requires: 
	Twitter-bootstrap, fontawesome, jquery, angularjs, bootstrap-color-picker (https://github.com/buberdds/angular-bootstrap-colorpicker)

*/

angular.module('wysiwyg.module', ['colorpicker.module'])
  .directive('wysiwyg', function ($timeout) {
    return {
      	template: '<div>' +
	      			'<div class="btn-group btn-group-sm wysiwyg-btn-group-margin">' +
						'<button title="Bold" tabindex="-1" type="button" unselectable="on" class="btn btn-default" ng-click="format(\'bold\')" ng-class="{ active: isBold}"><i class="fa fa-bold"></i></button>' +
						'<button title="Italic" tabindex="-1" type="button" unselectable="on" class="btn btn-default" ng-click="format(\'italic\')" ng-class="{ active: isItalic}"><i class="fa fa-italic"></i></button>' +
						'<button title="Underline" tabindex="-1" type="button" unselectable="on" class="btn btn-default" ng-click="format(\'underline\')" ng-class="{ active: isUnderlined}"><i class="fa fa-underline"></i></button>' +
						'<button title="Strikethrough" tabindex="-1" type="button" unselectable="on" class="btn btn-default" ng-click="format(\'strikethrough\')" ng-class="{ active: isStrikethrough}"><i class="fa fa-strikethrough"></i></button>' +
						'<button title="Subscript" tabindex="-1" type="button" unselectable="on" class="btn btn-default" ng-click="format(\'subscript\')" ng-class="{ active: isSubscript}"><i class="fa fa-subscript"></i></button>' +
						'<button title="Superscript" tabindex="-1" type="button" unselectable="on" class="btn btn-default" ng-click="format(\'superscript\')" ng-class="{ active: isSuperscript}"><i class="fa fa-superscript"></i></button>' +
					'</div>' +
					'<div class="btn-group btn-group-sm wysiwyg-btn-group-margin">' +
						'<select tabindex="-1"  unselectable="on" class="form-control wysiwyg-select" ng-model="font" ng-options="f for f in fonts" ng-change="setFont()">' +
						'</select>' +<commit_msg>add style into template<commit_after>'use strict';

/*
Usage: <wysiwyg textarea-id="question" textarea-class="form-control"  textarea-height="80px" textarea-name="textareaQuestion" textarea-required ng-model="question.question" enable-bootstrap-title="true"></wysiwyg>
	options
		textarea-id 			The id to assign to the editable div
		textarea-class			The class(es) to assign to the the editable div
		textarea-height			If not specified in a text-area class then the hight of the editable div (default: 80px)
		textarea-name			The name attribute of the editable div 
		textarea-required		HTML/AngularJS required validation
		ng-model				The angular data model
		enable-bootstrap-title	True/False whether or not to show the button hover title styled with bootstrap	

Requires: 
	Twitter-bootstrap, fontawesome, jquery, angularjs, bootstrap-color-picker (https://github.com/buberdds/angular-bootstrap-colorpicker)

*/

angular.module('wysiwyg.module', ['colorpicker.module'])
  .directive('wysiwyg', function ($timeout) {
    return {
      	template: '<div>' +				
					'<script>' +
					'	.wysiwyg-btn-group-margin{  margin-right:5px; }' +
					'	.wysiwyg-select{ height:30px;margin-bottom:1px;}' +
					'	.wysiwyg-colorpicker{ font-family: arial, sans-serif !important;font-size:16px !important; padding:2px 10px !important;}' +
					'</script>' +
	      			'<div class="btn-group btn-group-sm wysiwyg-btn-group-margin">' +
						'<button title="Bold" tabindex="-1" type="button" unselectable="on" class="btn btn-default" ng-click="format(\'bold\')" ng-class="{ active: isBold}"><i class="fa fa-bold"></i></button>' +
						'<button title="Italic" tabindex="-1" type="button" unselectable="on" class="btn btn-default" ng-click="format(\'italic\')" ng-class="{ active: isItalic}"><i class="fa fa-italic"></i></button>' +
						'<button title="Underline" tabindex="-1" type="button" unselectable="on" class="btn btn-default" ng-click="format(\'underline\')" ng-class="{ active: isUnderlined}"><i class="fa fa-underline"></i></button>' +
						'<button title="Strikethrough" tabindex="-1" type="button" unselectable="on" class="btn btn-default" ng-click="format(\'strikethrough\')" ng-class="{ active: isStrikethrough}"><i class="fa fa-strikethrough"></i></button>' +
						'<button title="Subscript" tabindex="-1" type="button" unselectable="on" class="btn btn-default" ng-click="format(\'subscript\')" ng-class="{ active: isSubscript}"><i class="fa fa-subscript"></i></button>' +
						'<button title="Superscript" tabindex="-1" type="button" unselectable="on" class="btn btn-default" ng-click="format(\'superscript\')" ng-class="{ active: isSuperscript}"><i class="fa fa-superscript"></i></button>' +
					'</div>' +
					'<div class="btn-group btn-group-sm wysiwyg-btn-group-margin">' +
						'<select tabindex="-1"  unselectable="on" class="form-control wysiwyg-select" ng-model="font" ng-options="f for f in fonts" ng-change="setFont()">' +
						'</select>' +
{'fraction_non_alphanumeric': 0.18144659676559446, 'fraction_numerical': 0.005509152301403945, 'mean_word_length': 4.911764705882353, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 69, 'https://': 2, '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': '6298876', 'n_tokens_mistral': 2038, 'n_tokens_neox': 1835, 'n_words': 406}