diff --git a/assets/3rdparty/wdt-emoji/wdt-emoji-bundle.js b/assets/3rdparty/wdt-emoji/wdt-emoji-bundle.js index 4bd8136e..71707ec6 100644 --- a/assets/3rdparty/wdt-emoji/wdt-emoji-bundle.js +++ b/assets/3rdparty/wdt-emoji/wdt-emoji-bundle.js @@ -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*$/, '') diff --git a/assets/js/components/emoji/picker.js b/assets/js/components/emoji/picker.js index 1510650a..4c21c1e4 100644 --- a/assets/js/components/emoji/picker.js +++ b/assets/js/components/emoji/picker.js @@ -11,7 +11,7 @@ ComunicWeb.components.emoji.picker = { ' × ' + '
' + '
' + - ' ' + + ' ' + ' ' + ' ' + ' ' + @@ -20,7 +20,7 @@ ComunicWeb.components.emoji.picker = { ' ' + ' ' + ' ' + - ' ' + + ' ' + '
' + '
' + '
' + diff --git a/assets/js/components/posts/form.js b/assets/js/components/posts/form.js index 9366adcf..c3f39c08 100644 --- a/assets/js/components/posts/form.js +++ b/assets/js/components/posts/form.js @@ -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,