Commit bac1b1e 1 parent 38b4b22 commit bac1b1e Copy full SHA for bac1b1e
File tree 5 files changed +14
-18
lines changed
5 files changed +14
-18
lines changed Original file line number Diff line number Diff line change @@ -182,19 +182,21 @@ export default {
182
182
// type -> 'emoji' / 'image'
183
183
type : 'emoji' ,
184
184
// content -> 数组
185
- content : '😀 😃 😄 😁 😆 😅 😂 🤣 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😛 😝 😜 🤓 😎 😏 😒 😞 😔 😟 😕 🙁 😣 😖 😫 😩 😢 😭 😤 😠 😡 😳 😱 😨 🤗 🤔 😶 😑 😬 🙄 😯 😴 😷 🤑 😈 🤡 💩 👻 💀 👀 👣' . split (
186
- / \s /
187
- ) ,
185
+ content :
186
+ '😀 😃 😄 😁 😆 😅 😂 🤣 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😛 😝 😜 🤓 😎 😏 😒 😞 😔 😟 😕 🙁 😣 😖 😫 😩 😢 😭 😤 😠 😡 😳 😱 😨 🤗 🤔 😶 😑 😬 🙄 😯 😴 😷 🤑 😈 🤡 💩 👻 💀 👀 👣' . split (
187
+ / \s /
188
+ ) ,
188
189
} ,
189
190
{
190
191
// tab 的标题
191
192
title : '手势' ,
192
193
// type -> 'emoji' / 'image'
193
194
type : 'emoji' ,
194
195
// content -> 数组
195
- content : '👐 🙌 👏 🤝 👍 👎 👊 ✊ 🤛 🤜 🤞 ✌️ 🤘 👌 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐 🖖 👋 🤙 💪 🖕 ✍️ 🙏' . split (
196
- / \s /
197
- ) ,
196
+ content :
197
+ '👐 🙌 👏 🤝 👍 👎 👊 ✊ 🤛 🤜 🤞 ✌️ 🤘 👌 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐 🖖 👋 🤙 💪 🖕 ✍️ 🙏' . split (
198
+ / \s /
199
+ ) ,
198
200
} ,
199
201
] ,
200
202
Original file line number Diff line number Diff line change @@ -61,7 +61,8 @@ SimpleHtmlParser.prototype = {
61
61
62
62
// regexps
63
63
64
- startTagRe : / ^ < ( [ ^ > \s \/ ] + ) ( ( \s + [ ^ = > \s ] + ( \s * = \s * ( ( \" [ ^ " ] * \" ) | ( \' [ ^ ' ] * \' ) | [ ^ > \s ] + ) ) ? ) * ) \s * \/ ? \s * > / m,
64
+ startTagRe :
65
+ / ^ < ( [ ^ > \s \/ ] + ) ( ( \s + [ ^ = > \s ] + ( \s * = \s * ( ( \" [ ^ " ] * \" ) | ( \' [ ^ ' ] * \' ) | [ ^ > \s ] + ) ) ? ) * ) \s * \/ ? \s * > / m,
65
66
endTagRe : / ^ < \/ ( [ ^ > \s ] + ) [ ^ > ] * > / m,
66
67
attrRe : / ( [ ^ = \s ] + ) ( \s * = \s * ( ( \" ( [ ^ " ] * ) \" ) | ( \' ( [ ^ ' ] * ) \' ) | [ ^ > \s ] + ) ) ? / gm,
67
68
Original file line number Diff line number Diff line change @@ -51,13 +51,5 @@ export default function bindEventKeyboardEvent(editor: Editor) {
51
51
lastChildNodeInPrevNode =
52
52
lastChildNodeInPrevNode . childNodes [ lastChildNodeInPrevNode . childNodes . length - 1 ]
53
53
}
54
-
55
- if (
56
- lastChildNodeInPrevNode instanceof HTMLElement &&
57
- lastChildNodeInPrevNode . tagName === 'IMG'
58
- ) {
59
- lastChildNodeInPrevNode . remove ( )
60
- e . preventDefault ( )
61
- }
62
54
} )
63
55
}
Original file line number Diff line number Diff line change @@ -69,8 +69,8 @@ class LineHeight extends DropListMenu implements MenuActive {
69
69
//获取range 开头结束的dom
70
70
const StartElem : DomElement = $ ( editor . selection . getSelectionStartElem ( ) )
71
71
const EndElem : DomElement = $ ( editor . selection . getSelectionEndElem ( ) )
72
- const childList : NodeListOf < ChildNode > | undefined = editor . selection . getRange ( )
73
- ?. commonAncestorContainer . childNodes
72
+ const childList : NodeListOf < ChildNode > | undefined =
73
+ editor . selection . getRange ( ) ?. commonAncestorContainer . childNodes
74
74
arrayDom_a . push ( this . getDom ( StartElem . elems [ 0 ] ) )
75
75
childList ?. forEach ( ( item , index ) => {
76
76
if ( item === this . getDom ( StartElem . elems [ 0 ] ) ) {
Original file line number Diff line number Diff line change 6
6
export function EMPTY_FN ( ) { }
7
7
8
8
//用于校验是否为url格式字符串
9
- export const urlRegex = / ^ ( h t t p | f t p | h t t p s ) : \/ \/ [ \w \- _ ] + ( \. [ \w \- _ ] + ) + ( [ \w \- . , @ ? ^ = % & a m p ; : / ~ + # ] * [ \w \- @ ? ^ = % & a m p ; / ~ + # ] ) ? /
9
+ export const urlRegex =
10
+ / ^ ( h t t p | f t p | h t t p s ) : \/ \/ [ \w \- _ ] + ( \. [ \w \- _ ] + ) + ( [ \w \- . , @ ? ^ = % & a m p ; : / ~ + # ] * [ \w \- @ ? ^ = % & a m p ; / ~ + # ] ) ? /
10
11
11
12
// 编辑器为了方便继续输入/换行等原因 主动生成的空标签
12
13
export const EMPTY_P = '<p data-we-empty-p=""><br></p>'
You can’t perform that action at this time.
0 commit comments