diff --git a/README.md b/README.md
index 804a148..109cf3c 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,11 @@
-TinyMCE FontAwesome Plugin
-===========================
+# TinyMCE FontAwesome Plugin
-###### v1.1.0
+###### v1.2.0
A plugin that lets you insert FontAwesome icons via TinyMCE. Currently uses FontAwesome v4.1.0.
-###Instructions
+### Instructions
- Make sure you have FontAwesome loaded on the page that contains TinyMCE.
- Copy the fontawesome folder into your TinyMCE plugins folder.
- Add this to your TinyMCE script:
@@ -14,7 +13,7 @@ A plugin that lets you insert FontAwesome icons via TinyMCE. Currently uses Font
```html
tinymce.init({
...
- plugins: 'fontawesome'
+ plugins: 'fontawesome noneditable'
...
extended_valid_elements: 'span[class]'
...
diff --git a/fontawesome (uncompressed)/css/fontawesome.css b/fontawesome (uncompressed)/css/fontawesome.css
deleted file mode 100644
index 870ebb3..0000000
--- a/fontawesome (uncompressed)/css/fontawesome.css
+++ /dev/null
@@ -1,31 +0,0 @@
-.mce-fontawesome-panel .fa {
- font-family:FontAwesome !important;
- cursor:pointer;
- padding:6px;
- border-radius:1px;
-}
-
-.mce-fontawesome-panel .fa:hover {
- background-color:#e3e3e3;
-}
-
-.mce-fontawesome-panel td {
-
-}
-
-.mce-i-flag {
- display: inline-block;
- font-family: FontAwesome;
- font-style: normal;
- font-weight: normal;
- line-height: 1;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- margin-right:1px;
- position:relative;
- top:1px;
-}
-
-.mce-i-flag:before {
- content: "\f024";
-}
\ No newline at end of file
diff --git a/fontawesome (uncompressed)/css/fontawesome.min.css b/fontawesome (uncompressed)/css/fontawesome.min.css
new file mode 100644
index 0000000..6a85020
--- /dev/null
+++ b/fontawesome (uncompressed)/css/fontawesome.min.css
@@ -0,0 +1,69 @@
+/* Accordion */
+
+.mce-fontawesome-panel-table {
+ -webkit-transition: 0.5s height;
+ transition: 0.5s height;
+ overflow: hidden;
+ height: 0;
+}
+
+/* Title */
+
+.mce-fontawesome-panel-title {
+ font-weight: bold;
+ margin-top: 5px;
+ margin-bottom: 5px;
+ cursor: pointer;
+ padding: 6px;
+ border-radius: 1px;
+}
+
+.mce-fontawesome-panel-title:hover {
+ background-color: #bfbfbf;
+ background-color: rgba(0,0,0,0.1);
+}
+
+.mce-fontawesome-panel-title {
+ border-bottom: 1px solid #eeeeee;
+}
+
+.mce-fontawesome-panel-accordion-hide .mce-fontawesome-panel-title {
+ border-bottom: 0;
+}
+
+.mce-fontawesome-panel-accordion:first-child .mce-fontawesome-panel-title {
+ margin-top: 0;
+}
+
+/* FontAwesome Icons */
+
+.mce-fontawesome-panel .fa {
+ font-family: FontAwesome !important;
+ cursor: pointer;
+ padding: 6px;
+ border-radius: 1px;
+}
+
+.mce-fontawesome-panel .fa:hover {
+ background-color: #bfbfbf;
+ background-color: rgba(0,0,0,0.1);
+}
+
+/* Toolbar & Menu Button */
+
+.mce-i-flag {
+ display: inline-block;
+ font-family: FontAwesome;
+ font-style: normal;
+ font-weight: normal;
+ line-height: 1;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ margin-right: 1px;
+ position: relative;
+ top: 1px;
+}
+
+.mce-i-flag:before {
+ content: "\f024";
+}
\ No newline at end of file
diff --git a/fontawesome (uncompressed)/plugin.min.js b/fontawesome (uncompressed)/plugin.min.js
index 78516a0..a022beb 100755
--- a/fontawesome (uncompressed)/plugin.min.js
+++ b/fontawesome (uncompressed)/plugin.min.js
@@ -1,506 +1,586 @@
// Created by Josh Hunt
// joshhunt180@gmail.com
-// v1.1.0
+// v1.2.0
tinymce.PluginManager.add('fontawesome', function (editor, url) {
- var iconlist = [
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
+ var webappIcons = [
[''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ ['']
+ ];
+
+ var filetypeIcons = [
[''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ ];
+
+ var spinnerIcons = [
[''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- [''],
- ['']
- ];
+ [''],
+ [''],
+ ['']
+ ];
+
+ var formcontrolIcons = [
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ ['']
+ ];
+
+ var currencyIcons = [
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ ['']
+ ];
+
+ var texteditorIcons = [
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ ['']
+ ];
+
+ var directionalIcons = [
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ ['']
+ ];
+
+ var videoplayerIcons = [
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ ['']
+ ];
+
+
+ var brandIcons = [
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ ['']
+ ];
+
+ var medicalIcons = [
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ [''],
+ ['']
+ ];
function showDialog() {
- //csslink = editor.dom.create('link', {
-// rel: 'stylesheet',
-// href: url + '/css/fontawesome.css'
-// });
-// document.getElementsByTagName('head')[0].appendChild(csslink);
+ var win;
- var gridHtml, win;
-
- function getParentTd(elm) {
- while (elm) {
- if (elm.nodeName == 'TD') {
- return elm;
- }
-
- elm = elm.parentNode;
- }
- }
-
- gridHtml = '
';
-
- var width = 23;
- for (y = 0; y < (iconlist.length / width); y++) {
- gridHtml += '';
-
- for (x = 0; x < width; x++) {
- if (iconlist[y * width + x]) {
- gridHtml += '' + iconlist[y * width + x] + ' | ';
+ var hideAccordion = 0;
+
+ function groupHtml(iconGroup, iconTitle) {
+
+ var gridHtml;
+
+ if (hideAccordion == 0) {
+ gridHtml = '' + iconTitle + '
';
+ gridHtml += '
';
+ hideAccordion = 1;
+ }
+ else {
+ gridHtml = '' + iconTitle + '
';
+ gridHtml += '
';
+ }
+
+ var width = 23;
+ for (y = 0; y < (iconGroup.length / width); y++) {
+ gridHtml += '';
+
+ for (x = 0; x < width; x++) {
+ if (iconGroup[y * width + x]) {
+ if (iconTitle == "Spinner") {
+ gridHtml += '' + iconGroup[y * width + x] + ' | ';
+ }
+ else {
+ gridHtml += '' + iconGroup[y * width + x] + ' | ';
+ }
+ }
}
- }
-
- gridHtml += '
';
- }
-
- gridHtml += '
';
-
- var iconsPanel = {
- type: 'container',
- html: gridHtml,
- onclick: function (e) {
- var target = e.target;
- if (target.nodeName == 'SPAN') {
- editor.execCommand('mceInsertContent', false, target.outerHTML);
- win.close();
- }
- },
- };
+
+ gridHtml += '';
+ }
+
+ gridHtml += '
';
+
+ return gridHtml;
+
+ }
+
+ var panelHtml = groupHtml(webappIcons, "Web Application") + groupHtml(filetypeIcons, "File Type") + groupHtml(spinnerIcons, "Spinner") + groupHtml(formcontrolIcons, "Form Control") + groupHtml(currencyIcons, "Currency") + groupHtml(texteditorIcons, "Text Editor") + groupHtml(directionalIcons, "Directional") + groupHtml(videoplayerIcons, "Video Player") + groupHtml(brandIcons, "Brand") + groupHtml(medicalIcons, "Medical");
win = editor.windowManager.open({
title: "Icons",
- spacing: 20,
- padding: 10,
+ spacing: 20,
+ padding: 10,
classes: 'fontawesome-panel',
- items: [
- iconsPanel, {
+ items: [
+ {
+ type: 'container',
+ html: panelHtml,
+ onclick: function (e) {
+ var target = e.target;
+ if (target.nodeName == 'SPAN') {
+ editor.execCommand('mceInsertContent', false, target.outerHTML);
+ win.close();
+ }
+ },
+
+ }, {
type: 'label',
text: ' '
}
@@ -512,12 +592,66 @@ tinymce.PluginManager.add('fontawesome', function (editor, url) {
}
}]
});
+
+ // Accordion
+
+ var accordionItems = new Array();
+
+ var divs = document.getElementsByTagName('div');
+ for (var i = 0; i < divs.length; i++) {
+ if (divs[i].className == 'mce-fontawesome-panel-accordion' || divs[i].className == 'mce-fontawesome-panel-accordion mce-fontawesome-panel-accordion-hide') {
+ accordionItems.push(divs[i])
+ }
+ }
+
+ // Assign onclick events to the accordion item headings
+ for (var i = 0; i < accordionItems.length; i++) {
+ var accordionTitle = getFirstChildWithTagName(accordionItems[i], 'DIV');
+ accordionTitle.onclick = toggleItem;
+ }
+
+ var firstDiv = accordionItems[0].getElementsByTagName('div')[1];
+ var firstDivHeight = firstDiv.offsetHeight;
+ firstDiv.style.height = firstDivHeight + 'px';
+
+ function toggleItem() {
+ var itemClass = this.parentNode.className;
+
+ // Hide all items
+ for (var i = 0; i < accordionItems.length; i++) {
+ accordionItems[i].className = 'mce-fontawesome-panel-accordion mce-fontawesome-panel-accordion-hide';
+ accordionItems[i].getElementsByTagName('div')[1].style.height = "0";
+ }
+
+ // Show this item if it was previously hidden
+ if (itemClass == 'mce-fontawesome-panel-accordion mce-fontawesome-panel-accordion-hide') {
+ var accordionItemContent = this;
+ do accordionItemContent = accordionItemContent.nextSibling; while(accordionItemContent && accordionItemContent.nodeType !== 1);
+
+ accordionItemContent.style.height = "auto";
+ var divHeight = accordionItemContent.offsetHeight;
+ accordionItemContent.style.height = "";
+ this.parentNode.className = 'mce-fontawesome-panel-accordion';
+ var that = this;
+ window.setTimeout(function () {
+ accordionItemContent.style.height = divHeight + 'px';
+ }, 50);
+ }
+ }
+
+ function getFirstChildWithTagName( element, tagName) {
+ for (var i = 0; i < element.childNodes.length; i++) {
+ if (element.childNodes[i].nodeName == tagName) {
+ return element.childNodes[i];
+ }
+ }
+ }
}
editor.on('init', function() {
csslink = editor.dom.create('link', {
rel: 'stylesheet',
- href: url + '/css/fontawesome.css'
+ href: url + '/css/fontawesome.min.css'
});
document.getElementsByTagName('head')[0].appendChild(csslink);
});
diff --git a/fontawesome/css/fontawesome.css b/fontawesome/css/fontawesome.css
deleted file mode 100644
index 870ebb3..0000000
--- a/fontawesome/css/fontawesome.css
+++ /dev/null
@@ -1,31 +0,0 @@
-.mce-fontawesome-panel .fa {
- font-family:FontAwesome !important;
- cursor:pointer;
- padding:6px;
- border-radius:1px;
-}
-
-.mce-fontawesome-panel .fa:hover {
- background-color:#e3e3e3;
-}
-
-.mce-fontawesome-panel td {
-
-}
-
-.mce-i-flag {
- display: inline-block;
- font-family: FontAwesome;
- font-style: normal;
- font-weight: normal;
- line-height: 1;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- margin-right:1px;
- position:relative;
- top:1px;
-}
-
-.mce-i-flag:before {
- content: "\f024";
-}
\ No newline at end of file
diff --git a/fontawesome/css/fontawesome.min.css b/fontawesome/css/fontawesome.min.css
new file mode 100644
index 0000000..e1d70e3
--- /dev/null
+++ b/fontawesome/css/fontawesome.min.css
@@ -0,0 +1 @@
+.mce-fontawesome-panel-table{-webkit-transition:.5s height;transition:.5s height;overflow:hidden;height:0}.mce-fontawesome-panel-title{font-weight:700;margin-top:5px;margin-bottom:5px;cursor:pointer;padding:6px;border-radius:1px}.mce-fontawesome-panel-title:hover{background-color:#bfbfbf;background-color:rgba(0,0,0,.1)}.mce-fontawesome-panel-title{border-bottom:1px solid #eee}.mce-fontawesome-panel-accordion-hide .mce-fontawesome-panel-title{border-bottom:0}.mce-fontawesome-panel-accordion:first-child .mce-fontawesome-panel-title{margin-top:0}.mce-fontawesome-panel .fa{font-family:FontAwesome!important;cursor:pointer;padding:6px;border-radius:1px}.mce-fontawesome-panel .fa:hover{background-color:#bfbfbf;background-color:rgba(0,0,0,.1)}.mce-i-flag{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-right:1px;position:relative;top:1px}.mce-i-flag:before{content:"\f024"}
\ No newline at end of file
diff --git a/fontawesome/plugin.min.js b/fontawesome/plugin.min.js
index cb2a0e7..ade2cf7 100755
--- a/fontawesome/plugin.min.js
+++ b/fontawesome/plugin.min.js
@@ -1 +1 @@
-tinymce.PluginManager.add("fontawesome",function(e,t){function r(){function i(e){while(e){if(e.nodeName=="TD"){return e}e=e.parentNode}}var t,r;t='';var s=23;for(y=0;y";for(x=0;x'+n[y*s+x]+""}}t+=""}t+="
";var o={type:"container",html:t,onclick:function(t){var n=t.target;if(n.nodeName=="SPAN"){e.execCommand("mceInsertContent",false,n.outerHTML);r.close()}}};r=e.windowManager.open({title:"Icons",spacing:20,padding:10,classes:"fontawesome-panel",items:[o,{type:"label",text:" "}],buttons:[{text:"Close",onclick:function(){r.close()}}]})}var n=[[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""]];e.on("init",function(){csslink=e.dom.create("link",{rel:"stylesheet",href:t+"/css/fontawesome.css"});document.getElementsByTagName("head")[0].appendChild(csslink)});e.addButton("fontawesome",{icon:"flag",text:"Icons",tooltip:"Icons",onclick:r});e.addMenuItem("fontawesome",{icon:"flag",text:"Icons",onclick:r,context:"insert"})})
\ No newline at end of file
+tinymce.PluginManager.add("fontawesome",function(f,e){function a(){function e(f,e){var a;0==h?(a=''+e+"
",a+='
',h=1):(a=''+e+"
",a+='
');var c=23;for(y=0;y",x=0;c>x;x++)f[y*c+x]&&(a+="Spinner"==e?''+f[y*c+x]+" | ":''+f[y*c+x]+" | ");a+=""}return a+="
"}function a(){for(var f=this.parentNode.className,x=0;x