shlskc's picture
make a copy of apple maths notes with the same features and functionality
3c20c85 verified
Raw History Blame Contribute Delete
1.23 kB
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
});
}
});