@@ -53,7 +53,7 @@ export function DocumentEditor({ documentId }: DocumentEditorProps) {
5353 const editor = useEditor ( {
5454 extensions : [
5555 StarterKit . configure ( {
56- codeBlock : false , // We'll use the lowlight version
56+ codeBlock : false ,
5757 } ) ,
5858 Placeholder . configure ( {
5959 placeholder : 'Start writing your document...' ,
@@ -70,7 +70,6 @@ export function DocumentEditor({ documentId }: DocumentEditorProps) {
7070 setHasUnsavedChanges ( true ) ;
7171 } ,
7272 onTransaction : ( ) => {
73- // Force re-render to update toolbar button states for any editor change
7473 setUpdateCounter ( prev => prev + 1 ) ;
7574 } ,
7675 editorProps : {
@@ -85,7 +84,6 @@ export function DocumentEditor({ documentId }: DocumentEditorProps) {
8584 if ( document && editor ) {
8685 setTitle ( document . title ) ;
8786
88- // Clean up empty or malformed HTML content
8987 let cleanContent = document . content ;
9088 if (
9189 ! cleanContent ||
@@ -101,7 +99,6 @@ export function DocumentEditor({ documentId }: DocumentEditorProps) {
10199 }
102100 } , [ document , editor ] ) ;
103101
104- // Track changes for unsaved state
105102 useEffect ( ( ) => {
106103 if ( document && editor ) {
107104 const currentContent = editor . getHTML ( ) ;
@@ -271,7 +268,6 @@ export function DocumentEditor({ documentId }: DocumentEditorProps) {
271268 />
272269 </ div >
273270
274- { /* Toolbar */ }
275271 { editor && (
276272 < div className = "flex items-center space-x-2 p-4 border-b border-gray-200 bg-gray-50" >
277273 < button
@@ -375,7 +371,6 @@ export function DocumentEditor({ documentId }: DocumentEditorProps) {
375371 </ div >
376372 ) }
377373
378- { /* Editor */ }
379374 < div className = "min-h-[400px]" >
380375 < EditorContent editor = { editor } />
381376 </ div >
0 commit comments