Build a markdown-enabled note-taking application with organization and search capabilities
Create a feature-rich note-taking application that supports markdown formatting, note organization with tags/folders, and full-text search.
let notes = JSON.parse(localStorage.getItem('notes')) || [];
function createNote(title, content) {
const note = {
id: Date.now(),
title,
content,
createdAt: new Date(),
tags: []
};
notes.push(note);
saveNotes();
return note;
}
function searchNotes(query) {
return notes.filter(note =>
note.title.toLowerCase().includes(query.toLowerCase()) ||
note.content.toLowerCase().includes(query.toLowerCase())
);
}