pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/thecodeholic/VanillaJsNotes

media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-bf8570e4081bd07e.css" /> GitHub - thecodeholic/VanillaJsNotes: Sticky notes app using vanilla javascript · GitHub
Skip to content

thecodeholic/VanillaJsNotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notes app using plain javascript

Install in your project

npm install @thecodeholic/plainjs-notes

Usage

const noteManager = new NoteManager({
  el: document.getElementById('your_wrapper_element_id'),
  notes: [
    {
      title: 'sunt aut facere repellat',
      body: 'uia et suscipit suscipit recusandae consequuntur expedita et cum reprehenderit molestiae ut ut quas totam nostrum rerum est autem sunt rem eveniet architecto'
    },
    // ...
  ]
});

Methods

// Add the note at the bottom
noteManager.addNote({
  title: '',
  body: ''
});

// Add the note at the top
noteManager.prependNote({
  title: '',
  body: ''
});

// Remove the first note
noteManager.removeNote(noteManager.notes[0]);

// Update all notes and rerender
noteManager.notes = [...];
noteManager.renderNotes();

Events

noteManager.onNoteAdd = (note) => {
  console.log("Note added ", note);
};
noteManager.onNoteChange = (note) => {
  console.log("Note changed ", note);
};
noteManager.onNoteRemove = (note) => {
  console.log("Note removed ", note);
};

Installation and view demo

  1. Clone the project
  2. Go to the project root directory
  3. Run npm install

Running on development using dev server

Run npm run start to start to webpack dev server with HMR ready

Build For production

Run npm run build to build project's all assets in dist folder.

About

Sticky notes app using vanilla javascript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy