|
@@ -68,7 +68,8 @@ Underline.prototype = {
|
|
let $text = $(
|
|
let $text = $(
|
|
text.startContainer.nodeType === 1 ? text.startContainer : text.startContainer.parentNode
|
|
text.startContainer.nodeType === 1 ? text.startContainer : text.startContainer.parentNode
|
|
);
|
|
);
|
|
- $text.css('text-decoration', 'underline');
|
|
|
|
|
|
+ let textUnderline = $text[0].getAttribute('text-decoration-line');
|
|
|
|
+ textUnderline && textUnderline === 'underline' && $text.css('text-decoration', 'underline');
|
|
editor.selection.restoreSelection();
|
|
editor.selection.restoreSelection();
|
|
// 执行 underline 命令
|
|
// 执行 underline 命令
|
|
// let result = editor.cmd.do('underline');
|
|
// let result = editor.cmd.do('underline');
|