Added text parser

This commit is contained in:
Pierre 2018-05-03 22:05:06 +02:00
parent 0ee542a3ac
commit 1044e3ff64
6 changed files with 38 additions and 3 deletions

View File

@ -873,6 +873,13 @@ var ComunicWeb = {
}, },
/**
* Comunic specific text parser
*/
textParser: {
//TODO : implement
},
/** /**
* Countdown timer * Countdown timer
*/ */

View File

@ -230,7 +230,7 @@ ComunicWeb.components.comments.ui = {
}); });
//Parse emojies //Parse emojies
ComunicWeb.components.emoji.parser.parse({ ComunicWeb.components.textParser.parse({
element: commentContent element: commentContent
}); });

View File

@ -902,7 +902,7 @@ ComunicWeb.components.conversations.chatWindows = {
}); });
//Parse emojies in text message //Parse emojies in text message
ComunicWeb.components.emoji.parser.parse({ ComunicWeb.components.textParser.parse({
element: textMessage, element: textMessage,
}); });

View File

@ -721,7 +721,7 @@ ComunicWeb.components.posts.ui = {
}); });
//Parse emojies //Parse emojies
ComunicWeb.components.emoji.parser.parse({ ComunicWeb.components.textParser.parse({
element: postContent element: postContent
}); });

View File

@ -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
});
}
}

View File

@ -313,6 +313,9 @@ class Dev {
//Modern textarea handler //Modern textarea handler
"js/components/textarea.js", "js/components/textarea.js",
//Comunic custom text parser
"js/components/textParser.js",
//Countdown timer //Countdown timer
"js/components/countdown.js", "js/components/countdown.js",