This commit is contained in:
aqu415
2022-03-06 09:47:24 +08:00
parent a71ec91b1c
commit dc5442713d
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -1519,7 +1519,7 @@
const lines = topic.split('\n').length const lines = topic.split('\n').length
const view_data = node._data.view; const view_data = node._data.view;
const element = view_data.element; const element = view_data.element;
const height = (lines * 12 + 20) const height = (lines * 12 + 14)
element.style.height = `${height}px` element.style.height = `${height}px`
} }
}, },
+1
View File
@@ -365,6 +365,7 @@
var ncs = getComputedStyle(element) var ncs = getComputedStyle(element)
scope.e_editor.value = topic scope.e_editor.value = topic
scope.e_editor.style.width = (element.clientWidth - parseInt(ncs.getPropertyValue('padding-left')) - parseInt(ncs.getPropertyValue('padding-right'))) + 'px' scope.e_editor.style.width = (element.clientWidth - parseInt(ncs.getPropertyValue('padding-left')) - parseInt(ncs.getPropertyValue('padding-right'))) + 'px'
scope.e_editor.style.height = (element.clientHeight - parseInt(ncs.getPropertyValue('padding-top')) - parseInt(ncs.getPropertyValue('padding-bottom'))) + 'px'
element.innerHTML = '' element.innerHTML = ''
element.appendChild(scope.e_editor) element.appendChild(scope.e_editor)
element.style.zIndex = 5 element.style.zIndex = 5