feat: BlockQoute display in client
This commit is contained in:
@@ -49,6 +49,7 @@ const sanitizeConfig = {
|
||||
'chat-text',
|
||||
"chat-link",
|
||||
'chat-mention',
|
||||
'chat-quote',
|
||||
],
|
||||
ALLOWED_ATTR: [
|
||||
'underline',
|
||||
@@ -64,6 +65,9 @@ const sanitizeConfig = {
|
||||
|
||||
const markedInstance = new marked.Marked({
|
||||
renderer: {
|
||||
blockquote({ text }) {
|
||||
return `<chat-quote>${escapeHTML(text)}</chat-quote>`
|
||||
},
|
||||
text({ text }) {
|
||||
return `<chat-text>${escapeHTML(text)}</chat-text>`
|
||||
},
|
||||
|
||||
@@ -25,6 +25,7 @@ function prettyFlatParsedMessage(html: string) {
|
||||
const textElementTags = [
|
||||
'chat-text',
|
||||
'chat-mention',
|
||||
'chat-quote',
|
||||
]
|
||||
function checkContinuousElement(tagName: string) {
|
||||
/* console.log('shangyige ', lastElementType)
|
||||
|
||||
Reference in New Issue
Block a user