mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-25 21:39:21 +00:00
Can add emojies on posts
This commit is contained in:
parent
3cee773de0
commit
7d7fb2c499
@ -875,7 +875,7 @@
|
||||
|
||||
if (selection.ce) { // if contenteditable
|
||||
el.focus();
|
||||
document.execCommand('insertText', false, emo);
|
||||
el.innerHTML += emo; //COMUNIC EDIT document.execCommand('insertText', false, emo);
|
||||
} else {
|
||||
var textBefore = val.substring(0, selection.start);
|
||||
textBefore = textBefore.replace(/:\S*$/, '')
|
||||
|
@ -11,7 +11,7 @@ ComunicWeb.components.emoji.picker = {
|
||||
'<a href="#" class="wdt-emoji-popup-mobile-closer"> × </a>' +
|
||||
'<div class="wdt-emoji-menu-content">' +
|
||||
' <div id="wdt-emoji-menu-header">' +
|
||||
' <a class="wdt-emoji-tab active" data-group-name="Recent"></a>' +
|
||||
' <!--<a class="wdt-emoji-tab active" data-group-name="Recent"></a>-->' +
|
||||
' <a class="wdt-emoji-tab" data-group-name="People"></a>' +
|
||||
' <a class="wdt-emoji-tab" data-group-name="Nature"></a>' +
|
||||
' <a class="wdt-emoji-tab" data-group-name="Foods"></a>' +
|
||||
@ -20,7 +20,7 @@ ComunicWeb.components.emoji.picker = {
|
||||
' <a class="wdt-emoji-tab" data-group-name="Objects"></a>' +
|
||||
' <a class="wdt-emoji-tab" data-group-name="Symbols"></a>' +
|
||||
' <a class="wdt-emoji-tab" data-group-name="Flags"></a>' +
|
||||
' <a class="wdt-emoji-tab" data-group-name="Custom"></a>' +
|
||||
' <!--<a class="wdt-emoji-tab" data-group-name="Custom"></a>-->' +
|
||||
' </div>' +
|
||||
' <div class="wdt-emoji-scroll-wrapper">' +
|
||||
' <div id="wdt-emoji-menu-items">' +
|
||||
|
@ -32,17 +32,30 @@ ComunicWeb.components.posts.form = {
|
||||
class: "box-body"
|
||||
});
|
||||
|
||||
//Make sure emojie picker is already initialized
|
||||
ComunicWeb.components.emoji.picker.init();
|
||||
|
||||
//Create post message contener
|
||||
var newPostMessageContener = createElem2({
|
||||
appendTo: boxBody,
|
||||
type: "div"
|
||||
});
|
||||
|
||||
//Create post message textarea
|
||||
var inputMessageDiv = createElem2({
|
||||
appendTo: boxBody,
|
||||
appendTo: newPostMessageContener,
|
||||
type: "div",
|
||||
class: "new-message",
|
||||
class: "new-message wdt-emoji-bundle-enabled",
|
||||
innerHTML: ""
|
||||
});
|
||||
|
||||
//Enable bootstrap-wysiwyg
|
||||
$(inputMessageDiv).wysiwyg();
|
||||
|
||||
//Enable emojies picker
|
||||
ComunicWeb.components.emoji.picker.addPicker(inputMessageDiv);
|
||||
|
||||
|
||||
//Add the different post types
|
||||
var postTypesContainer = createElem2({
|
||||
appendTo: boxBody,
|
||||
|
Loading…
Reference in New Issue
Block a user