Added Emojis and headers (h1,h2...) in sceditor
@ -52,6 +52,7 @@
|
||||
<script src="{$smarty.const.BLOG_BASEURL}/fp-interface/lang/{$lang_locale}/sceditor.js"></script>
|
||||
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/plugins/flatPressFileManager.js"></script>
|
||||
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/plugins/flatPressCustomBBCodes.js"></script>
|
||||
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/plugins/flatPressEmojis.js"></script>
|
||||
<script>
|
||||
// Replace the textarea #example with SCEditor
|
||||
var lang_editor = "{$lang_locale}";
|
||||
@ -60,7 +61,7 @@
|
||||
var textarea = document.getElementById('content_textarea');
|
||||
sceditor.create(textarea, {
|
||||
plugins: 'flatPressFileManager',
|
||||
toolbar: 'bold,italic,underline,strike,subscript,superscript|left,center,right,justify|font,size,color,removeformat|cut,copy,pastetext|bulletlist,orderedlist,indent,outdent|table|code,quote|horizontalrule,flatPressFileManager,email,link,unlink|emoticon,youtube,date,time|ltr,rtl|print,maximize,source',
|
||||
toolbar: 'bold,italic,underline,strike,subscript,superscript|left,center,right,justify|font,size,color,removeformat|cut,copy,pastetext|bulletlist,orderedlist,indent,outdent|table|code,quote|horizontalrule,flatPressFileManager,email,link,unlink|emojis,youtube,date,time|ltr,rtl|print,maximize,source',
|
||||
emoticonsRoot: eRoot,
|
||||
format: 'bbcode',
|
||||
height: "400px",
|
||||
|
@ -44,6 +44,7 @@
|
||||
<script src="{$smarty.const.BLOG_BASEURL}/fp-interface/lang/{$lang_locale}/sceditor.js"></script>
|
||||
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/plugins/flatPressFileManager.js"></script>
|
||||
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/plugins/flatPressCustomBBCodes.js"></script>
|
||||
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/plugins/flatPressEmojis.js"></script>
|
||||
<script>
|
||||
// Replace the textarea #example with SCEditor
|
||||
var lang_editor = "{$lang_locale}";
|
||||
@ -53,7 +54,7 @@
|
||||
var textarea = document.getElementById('content_textarea');
|
||||
sceditor.create(textarea, {
|
||||
plugins: 'flatPressFileManager',
|
||||
toolbar: 'bold,italic,underline,strike,subscript,superscript|left,center,right,justify|font,size,color,removeformat|cut,copy,pastetext|bulletlist,orderedlist,indent,outdent|table|code,quote|horizontalrule,flatPressFileManager,email,link,unlink|emoticon,youtube,date,time|ltr,rtl|print,maximize,source',
|
||||
toolbar: 'bold,italic,underline,strike,subscript,superscript|left,center,right,justify|font,size,color,removeformat|cut,copy,pastetext|bulletlist,orderedlist,indent,outdent|table|code,quote|horizontalrule,flatPressFileManager,email,link,unlink|emojis,youtube,date,time|ltr,rtl|print,maximize,source',
|
||||
emoticonsRoot: eRoot,
|
||||
format: 'bbcode',
|
||||
height: "400px",
|
||||
|
@ -716,6 +716,20 @@ img {
|
||||
color: #111 !important;
|
||||
}
|
||||
|
||||
#sceditor-Emojis {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#sceditor-Emojis a {
|
||||
margin: 0.2rem;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.sceditor-button-emojis div {
|
||||
background-position: 0px -480px !important;
|
||||
}
|
||||
|
||||
/* Modal to upload files */
|
||||
|
||||
#flatpress-files-modal .modal-header {
|
||||
|
Before Width: | Height: | Size: 756 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 781 B |
Before Width: | Height: | Size: 972 B |
Before Width: | Height: | Size: 865 B |
Before Width: | Height: | Size: 753 B |
Before Width: | Height: | Size: 965 B |
@ -1,9 +0,0 @@
|
||||
Presenting, Nomicons: The Full Monty :o
|
||||
|
||||
Credits:
|
||||
Oscar Gruno, aka Nominell v. 2.0 -> oscargruno@mac.com
|
||||
Andy Fedosjeenko, aka Nightwolf -> bobo@animevanguard.com
|
||||
|
||||
Copyright (C) 2001-Infinity, Oscar Gruno & Andy Fedosjeenko
|
||||
|
||||
You can redistribute these files as much as you like, as long as you keep this file with them and give us the proper credit. You may even rape them if you please, just give us credit for our work.
|
Before Width: | Height: | Size: 877 B |
Before Width: | Height: | Size: 1012 B |
Before Width: | Height: | Size: 991 B |
Before Width: | Height: | Size: 983 B |
Before Width: | Height: | Size: 793 B |
Before Width: | Height: | Size: 792 B |
Before Width: | Height: | Size: 867 B |
Before Width: | Height: | Size: 792 B |
Before Width: | Height: | Size: 572 B |
Before Width: | Height: | Size: 793 B |
Before Width: | Height: | Size: 912 B |
Before Width: | Height: | Size: 694 B |
Before Width: | Height: | Size: 804 B |
Before Width: | Height: | Size: 799 B |
Before Width: | Height: | Size: 789 B |
Before Width: | Height: | Size: 780 B |
Before Width: | Height: | Size: 783 B |
Before Width: | Height: | Size: 788 B |
Before Width: | Height: | Size: 930 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 983 B |
Before Width: | Height: | Size: 981 B |
Before Width: | Height: | Size: 763 B |
Before Width: | Height: | Size: 718 B |
Before Width: | Height: | Size: 810 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 791 B |
Before Width: | Height: | Size: 1010 B |
@ -67,4 +67,17 @@ sceditor.formats.bbcode.set('img', {
|
||||
return '<img' + attribs + ' src="' + sceditor.escapeUriScheme(content) + '" />';
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Header tag (From h1 to h6)
|
||||
|
||||
for(let i = 1; i < 7; ++i) { // Headers: h1 to h6
|
||||
sceditor.formats.bbcode.set('h' + i, {
|
||||
tags: {
|
||||
['h' + i] : null,
|
||||
},
|
||||
isInline: false,
|
||||
format: '[h'+ i +']{0}[/h' + i + ']',
|
||||
html: '<h' + i + '>{0}</h' + i + '>',
|
||||
});
|
||||
}
|
41
admin/res/sceditor/plugins/flatpressEmojis.js
Normal file
@ -0,0 +1,41 @@
|
||||
|
||||
|
||||
const EMOJIS = [
|
||||
'😀', '😃', '😄', '😁', '😆', '😅', '😂', '🤣', '😊', '😇',
|
||||
'🙂', '🙃', '😉', '😌', '😍', '🥰', '😘', '😗', '😙', '😚',
|
||||
'😋', '😛', '😝', '😜', '🤪', '🤨', '🧐', '🤓', '😎', '🤩',
|
||||
'🥳', '😏', '😒', '😞', '😔', '😟', '😕', '🙁', '☹️', '😣',
|
||||
'😖', '😫', '😩', '🥺', '😢', '😭', '😤', '😠', '😡', '🤬',
|
||||
'🤯', '😳', '🥵', '🥶', '😱', '😨', '😰', '😥', '😓', '🤗',
|
||||
'🤔', '🤭', '🤫', '🤥', '😶', '😐', '😑', '😬', '🙄', '😯',
|
||||
'😦', '😧', '😮', '😲', '🥱', '😴', '🤤', '😪', '😵', '🤐',
|
||||
'🥴', '🤢', '🤮', '🤧', '😷', '🤒', '🤕', '🤑', '🤠', '😈',
|
||||
'👿'
|
||||
];
|
||||
|
||||
sceditor.command.set('emojis', {
|
||||
exec: function(caller) {
|
||||
|
||||
const sceditorInsert = this.insert;
|
||||
|
||||
const createEmojiLink = function(emoji) {
|
||||
let link = document.createElement('a');
|
||||
const linkText = document.createTextNode(emoji);
|
||||
link.appendChild(linkText);
|
||||
link.onclick = () => { sceditorInsert(emoji) };
|
||||
return link;
|
||||
};
|
||||
|
||||
const emojisShowListContent = function() {
|
||||
let content = document.createElement('div');
|
||||
content.id = 'sceditor-Emojis';
|
||||
EMOJIS.forEach(function(emoji) {
|
||||
content.appendChild(createEmojiLink(emoji));
|
||||
});
|
||||
return content;
|
||||
};
|
||||
|
||||
this.createDropDown(caller, 'emojis-list', emojisShowListContent());
|
||||
},
|
||||
tooltip: 'Insert a emoji emoticon'
|
||||
});
|