Skip to content

Commit

Permalink
Version 2.1.0
Browse files Browse the repository at this point in the history
- Added demo
- Added accordion indicators
- Added icon titles
- Updated FontAwesome to v4.7.0
  • Loading branch information
josh18 committed Jun 16, 2017
1 parent 2afff68 commit 8f97682
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TinyMCE FontAwesome Plugin

###### v2.0.9
###### v2.1.0

A plugin that lets you insert FontAwesome icons via TinyMCE. Currently uses FontAwesome v4.6.3 and is tested on TinyMCE v4.4.2.

Expand Down
24 changes: 24 additions & 0 deletions demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>TinyMCE FontAwesome Plugin Demo</title>
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
</head>
<body>
<textarea></textarea>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/tinymce.min.js"></script>
<script>
let dirName = window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/'));
tinymce.PluginManager.load('fontawesome', dirName + '/fontawesome/plugin.min.js');
tinymce.init({
selector:'textarea',
content_css: 'https://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css',
noneditable_noneditable_class: 'fa',
plugins: '-fontawesome noneditable',
toolbar: 'fontawesome',
extended_valid_elements: 'span[*]'
});
</script>
</body>
</html>
15 changes: 11 additions & 4 deletions fontawesome.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.mce-fontawesome-panel .mce-container-body > .mce-container,
.mce-fontawesome-panel .mce-container-body > .mce-container > .mce-container-body {
.mce-fontawesome-panel .mce-container-body > .mce-container,
.mce-fontawesome-panel .mce-container-body > .mce-container > .mce-container-body {
height: auto !important;
width: 670px;
}
Expand All @@ -11,6 +11,8 @@
}

.mce-fontawesome-panel-title {
display: flex;
align-items: center;
font-weight: 700;
margin-top: 5px;
margin-bottom: 4px;
Expand All @@ -30,13 +32,18 @@
}

.mce-fontawesome-panel-accordion-open .mce-fontawesome-panel-title {
border-bottom-color: 1px solid #eee;
border-bottom: 1px solid #eee;
}

.mce-fontawesome-panel-accordion:first-child .mce-fontawesome-panel-title {
margin-top: 0;
}

.mce-fontawesome-panel-accordion-indicator {
margin-left: auto;
font-family: FontAwesome;
}

.mce-fontawesome-panel-content {
transition: .5s height;
overflow: hidden;
Expand Down Expand Up @@ -151,4 +158,4 @@

.mce-i-flag:before {
content: "\f024";
}
}
2 changes: 1 addition & 1 deletion fontawesome/css/fontawesome.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions fontawesome/plugin.min.js

Large diffs are not rendered by default.

20 changes: 16 additions & 4 deletions plugin.js

Large diffs are not rendered by default.

0 comments on commit 8f97682

Please sign in to comment.