mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 12:09:21 +00:00
Added text parser
This commit is contained in:
parent
0ee542a3ac
commit
1044e3ff64
@ -873,6 +873,13 @@ var ComunicWeb = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Comunic specific text parser
|
||||
*/
|
||||
textParser: {
|
||||
//TODO : implement
|
||||
},
|
||||
|
||||
/**
|
||||
* Countdown timer
|
||||
*/
|
||||
|
@ -230,7 +230,7 @@ ComunicWeb.components.comments.ui = {
|
||||
});
|
||||
|
||||
//Parse emojies
|
||||
ComunicWeb.components.emoji.parser.parse({
|
||||
ComunicWeb.components.textParser.parse({
|
||||
element: commentContent
|
||||
});
|
||||
|
||||
|
@ -902,7 +902,7 @@ ComunicWeb.components.conversations.chatWindows = {
|
||||
});
|
||||
|
||||
//Parse emojies in text message
|
||||
ComunicWeb.components.emoji.parser.parse({
|
||||
ComunicWeb.components.textParser.parse({
|
||||
element: textMessage,
|
||||
});
|
||||
|
||||
|
@ -721,7 +721,7 @@ ComunicWeb.components.posts.ui = {
|
||||
});
|
||||
|
||||
//Parse emojies
|
||||
ComunicWeb.components.emoji.parser.parse({
|
||||
ComunicWeb.components.textParser.parse({
|
||||
element: postContent
|
||||
});
|
||||
|
||||
|
25
assets/js/components/textParser.js
Normal file
25
assets/js/components/textParser.js
Normal 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
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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",
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user