bug: can not use quick insert in math block and front matter

This commit is contained in:
jocs 2018-10-09 21:46:00 +08:00
parent 2f87d334dc
commit e1ac8e2977
3 changed files with 12 additions and 5 deletions

View File

@ -345,6 +345,11 @@ li.ag-task-list-item > input.ag-checkbox-checked ~ * {
color: var(--regularColor);
}
li.ag-task-list-item > input.ag-checkbox-checked ~ p {
text-decoration: line-through;
color: var(--secondaryColor);
}
li.ag-task-list-item > input[type=checkbox]::before {
content: '';
width: 16px;
@ -475,9 +480,10 @@ pre.ag-active.ag-code-block::before,
pre.ag-active.ag-code-block::after,
pre.ag-active.ag-multiple-math::before,
pre.ag-active.ag-multiple-math::after {
color: var(--placeholerColor);
color: var(--regularColor);
font-family: monospace;
position: absolute;
font-weight: 600;
left: 0;
}
@ -590,7 +596,8 @@ span.ag-emoji-marked-text {
left: 30px;
font-size: 14px;
font-family: monospace;
color: var(--secondaryColor);
font-weight: 600;
color: var(--activeColor);
background: transparent;
border: none;
z-index: 10;

View File

@ -92,8 +92,8 @@ const updateCtrl = ContentState => {
// Input @ to quick insert paragraph
ContentState.prototype.checkQuickInsert = function (block) {
const { type, text } = block
if (type !== 'span') return false
const { type, text, functionType } = block
if (type !== 'span' || functionType) return false
return /^@[a-zA-Z\d]*$/.test(text)
}

View File

@ -33,7 +33,7 @@
}
.ag-quick-insert .active,
.ag-quick-insert div.item:hover {
background-color: #ecf5ff;
background-color: rgb(243, 243, 243);
}
.ag-quick-insert .no-result {