File size: 1,231 Bytes
3c20c85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
document.addEventListener('DOMContentLoaded', function() {
    // Initialize math keyboard functionality
    const mathButtons = document.querySelectorAll('.bg-gray-100.hover\\:bg-gray-200');
    mathButtons.forEach(button => {
        button.addEventListener('click', function() {
            const symbol = this.textContent;
            // In a real app, this would insert the symbol at the cursor position
            console.log(`Inserting math symbol: ${symbol}`);
        });
    });

    // Toolbar button functionality
    const toolbarButtons = document.querySelectorAll('.hover\\:bg-gray-100');
    toolbarButtons.forEach(button => {
        button.addEventListener('click', function() {
            const icon = this.querySelector('i');
            const iconName = icon.getAttribute('data-feather');
            console.log(`Toolbar action: ${iconName}`);
        });
    });

    // Add section button functionality
    const addSectionButton = document.querySelector('.text-blue-500');
    if (addSectionButton) {
        addSectionButton.addEventListener('click', function() {
            console.log('Adding new section');
            // In a real app, this would add a new section to the note
        });
    }
});