MCPcopy Create free account
hub / github.com/dajie111/nodeseek-userscript / clearEditor

Function clearEditor

notes.js:1793–1809  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1791 }
1792
1793 function clearEditor(){
1794 titleInput.value = '';
1795 editor.innerHTML = '';
1796 // 清除可能自动插入的<br>标签
1797 setTimeout(() => {
1798 if (editor.innerHTML === '<br>' || editor.innerHTML === '<br/>') {
1799 editor.innerHTML = '';
1800 }
1801 }, 10);
1802 // 重置标题计数器
1803 titleCounter.textContent = '0/59';
1804 titleCounter.style.color = '#6b7280';
1805 // 更新保存状态
1806 updateSaveState();
1807 // 更新按钮文本
1808 updateButtonTexts();
1809 }
1810
1811 function saveCurrent(){
1812 const map = readJSON(LS_KEYS.notes, {});

Callers 5

createNewNoteFunction · 0.85
addCategoryFunction · 0.85
deleteCategoryFunction · 0.85
deleteCurrentNoteFunction · 0.85
buildDialogFunction · 0.85

Calls 2

updateSaveStateFunction · 0.85
updateButtonTextsFunction · 0.85

Tested by

no test coverage detected