first commit
This commit is contained in:
37
public/ckeditor/plugins/ckeditor_fa/css/ckeditor-fa.css
Executable file
37
public/ckeditor/plugins/ckeditor_fa/css/ckeditor-fa.css
Executable file
@@ -0,0 +1,37 @@
|
||||
.cke_reset_all .fa {
|
||||
display: inline-block;
|
||||
font: normal normal normal 14px/1 FontAwesome;
|
||||
font-size: inherit;
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
color: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
.cke_reset_all .fa:before {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.ckeditor-fa-wrap {
|
||||
display: inline-block;
|
||||
padding: 10px;
|
||||
font-size: 30px;
|
||||
color: #555;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
}
|
||||
.ckeditor-fa-wrap .active{
|
||||
color: #ff0000;
|
||||
}
|
||||
#ckeditor-fa-icons{
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#ckeditor-fa-icons-select{
|
||||
white-space: normal;
|
||||
text-align: center;
|
||||
}
|
||||
3
public/ckeditor/plugins/ckeditor_fa/dialogs/ckeditor-fa.js
Executable file
3
public/ckeditor/plugins/ckeditor_fa/dialogs/ckeditor-fa.js
Executable file
@@ -0,0 +1,3 @@
|
||||
function ckeditor_fa_click(a){a.getAttribute("title");document.getElementsByClassName("fontawesomeClass")[0].getElementsByTagName("input")[0].value=a.getAttribute("title");for(var c=document.getElementById("ckeditor-fa-icons-select").getElementsByTagName("i"),d=0;d<c.length;d++)c[d].className=c[d].className.replace("active","");a.className+=" active"}
|
||||
(function(a){CKEDITOR.dialog.add("ckeditorFaDialog",function(c){var d=function(){a.ajaxSetup({async:!1});var b=a.getJSON("/ajax/ckedtor-fa/get-icons");a.ajaxSetup({async:!0});return 200==b.status?b.responseJSON.html:"Icons not allowed"}();return{title:"FontAwesome Icons",minWidth:400,minHeight:200,contents:[{id:"font-awesome",label:"Add icon",elements:[{type:"text",id:"faicon",className:"fontawesomeClass",style:"display:none",validate:CKEDITOR.dialog.validate.notEmpty("Select fontAwesome icon")},
|
||||
{type:"html",html:'\x3cdiv id\x3d"ckeditor-fa-icons"\x3e'+d+"\x3c/div\x3e"}]}],onOk:function(){for(var b=document.getElementById("ckeditor-fa-icons-select").getElementsByClassName("active"),a=0;a<b.length;a++)b[a].className=b[a].className.replace("active","");b=c.document.createElement("i");b.setAttribute("class","fa fa-"+this.getValueOf("font-awesome","faicon"));c.insertElement(b)}}})})(jQuery);
|
||||
Reference in New Issue
Block a user