diff --git a/assets/js/common/functionsSchema.js b/assets/js/common/functionsSchema.js index 7f2c7b42..0bef3aaa 100644 --- a/assets/js/common/functionsSchema.js +++ b/assets/js/common/functionsSchema.js @@ -873,6 +873,13 @@ var ComunicWeb = { }, + /** + * Comunic specific text parser + */ + textParser: { + //TODO : implement + }, + /** * Countdown timer */ diff --git a/assets/js/components/comments/ui.js b/assets/js/components/comments/ui.js index d1f03ff2..769bd0e5 100644 --- a/assets/js/components/comments/ui.js +++ b/assets/js/components/comments/ui.js @@ -230,7 +230,7 @@ ComunicWeb.components.comments.ui = { }); //Parse emojies - ComunicWeb.components.emoji.parser.parse({ + ComunicWeb.components.textParser.parse({ element: commentContent }); diff --git a/assets/js/components/conversations/chatWindows.js b/assets/js/components/conversations/chatWindows.js index ebbbd051..7b71435b 100644 --- a/assets/js/components/conversations/chatWindows.js +++ b/assets/js/components/conversations/chatWindows.js @@ -902,7 +902,7 @@ ComunicWeb.components.conversations.chatWindows = { }); //Parse emojies in text message - ComunicWeb.components.emoji.parser.parse({ + ComunicWeb.components.textParser.parse({ element: textMessage, }); diff --git a/assets/js/components/posts/ui.js b/assets/js/components/posts/ui.js index 0ede8329..f09429d3 100644 --- a/assets/js/components/posts/ui.js +++ b/assets/js/components/posts/ui.js @@ -721,7 +721,7 @@ ComunicWeb.components.posts.ui = { }); //Parse emojies - ComunicWeb.components.emoji.parser.parse({ + ComunicWeb.components.textParser.parse({ element: postContent }); diff --git a/assets/js/components/textParser.js b/assets/js/components/textParser.js new file mode 100644 index 00000000..bb1b2e6e --- /dev/null +++ b/assets/js/components/textParser.js @@ -0,0 +1,25 @@ +/** + * Comunic specific text parser + * + * @author Pierre HUBERT + */ + +ComunicWeb.components.textParser = { + + /** + * Parse an element that contains some user input + * + * @param {object} info Information about the element to parse + */ + parse: function(info){ + + + //Parse emojies + ComunicWeb.components.emoji.parser.parse({ + element: info.element + }); + + } + + +} \ No newline at end of file diff --git a/system/config/dev.config.php b/system/config/dev.config.php index 04c6a4c5..204c2e94 100644 --- a/system/config/dev.config.php +++ b/system/config/dev.config.php @@ -313,6 +313,9 @@ class Dev { //Modern textarea handler "js/components/textarea.js", + //Comunic custom text parser + "js/components/textParser.js", + //Countdown timer "js/components/countdown.js",