How To Build Notes App Using HTML CSS and JavaScript

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 172

  • @islamicfinance001
    @islamicfinance001 10 месяцев назад +24

    ******* Attention ********
    Using the "let" keyword instead of "const" in declaring 'notes' is making a huge difference in the final outcome. SO, make sure to use the let keyword in declaring the notes variable!

  • @TaiwoRasidi-v5v
    @TaiwoRasidi-v5v 3 дня назад

    With this your video, i believe that very soon i will be proud of this journey

  • @polimorphic13
    @polimorphic13 Год назад +9

    Thank you again! I've been the whole morning creating projects following your tutorials.

  • @HunterLeRay
    @HunterLeRay Месяц назад +1

    Going strong, watching one of these everyday. learning consistently as well!

    • @GreatStackDev
      @GreatStackDev  Месяц назад

      Glad to hear that. Keep coding.😊

    • @ashwinkumar5726
      @ashwinkumar5726 22 дня назад

      Inside input box we can delete all data including delete img @@GreatStackDev

  • @batuhanbayr7613
    @batuhanbayr7613 Год назад +3

    best teacher for juniors 💙

  • @islamicfinance001
    @islamicfinance001 10 месяцев назад +4

    @GreatStack, What is the necessity of the line 24 (i.e. notes = document.querySelectorAll(".input-box");) while the same thing is written in the line 3? Could you plz explain...

    • @bashcode6699
      @bashcode6699 7 месяцев назад +1

      because let can be accessed in block scope separately, it cannot be globally accessed.

  • @olawale11954
    @olawale11954 Год назад +4

    Thank you sir for the video. Have learnt alot from your videos

  • @ayushmanlimbu
    @ayushmanlimbu 8 месяцев назад +2

    Quick Query. When we select the note the blinking line is not on the first line but its next to the delete icon. How to improve that?

  • @Dev_Ribeiro
    @Dev_Ribeiro Год назад +6

    Great for learning how to use local storage and other things, congratulations for the video

  • @Efizzy_brendan
    @Efizzy_brendan Год назад +1

    You did not work on the edit button? Assuming there's error and needed corrections 🤷🏻‍♀️
    Nice one boss

  • @Islamic_content92
    @Islamic_content92 Год назад

    Js tutorial banaye I want to learn JavaScript 👏👏👏👏jese basic js project wese hi js tutorial banaye

  • @bilbyplaisir9413
    @bilbyplaisir9413 Год назад +2

    Hi I can say since I followed you my skills are now increasing I like your videos so much but I wanted you to make a video about a working payment gateway thank you 🙏🙏👋👋

  • @francesco.paletta
    @francesco.paletta 10 месяцев назад

    Thank you for this tutorial! You explained that very well.

  • @shubhamkapase07
    @shubhamkapase07 8 месяцев назад +9

    I see people getting error one important part is left in the code Check this you have to update Storage:
    createBtn.addEventListener("click", ()=>{
    let inputBox = document.createElement("p");
    let img = document.createElement("img");
    inputBox.className = "input-box";
    inputBox.setAttribute("contenteditable", "true");
    img.src = "images/delete.png";
    notesContainer.appendChild(inputBox).appendChild(img);
    updateStorage(); // Update storage when a new note is created
    })

    • @resh7521
      @resh7521 4 месяца назад

      Thank you so much, you saved me

    • @dubhub4373
      @dubhub4373 Месяц назад

      Yes but content inside the p is getting deleted after refreshing the page

  • @bookreadershub1153
    @bookreadershub1153 Год назад

    better understanding of DOM manipulation

  • @vigneshnaik546
    @vigneshnaik546 Год назад +1

    Instead of create element in javascript we can use inseradjecent html this is easy way

  • @ritiksharma185
    @ritiksharma185 10 месяцев назад +9

    i don't where i code wrong but i write code like you but everything is working but the local storage save notes code not working can you help me please?

    • @viczav
      @viczav 6 месяцев назад

      Did you fix it? Everything works perfectly but that feature, lol

    • @aurelgolemi3626
      @aurelgolemi3626 5 месяцев назад

      I have a similar problem to which one note stays permanent without the delete button

    • @KardanKaaal
      @KardanKaaal 2 месяца назад +2

      check event listener of notes container wherr the 2nd else condition check whether e.target.tagName = "p"; or e.target.tagName="P";

    • @KardanKaaal
      @KardanKaaal 2 месяца назад

      ​@@aurelgolemi3626You deleted the delete button using backspace as it is inside P tag. The delete button should be outside of the P tag. You can check there is a cursor line if you mistakenly clicked there and press backspace then boom you delete your delete key. So better try to add that delete key outside of your oaragraph tag because we gave that paragraph tag to edit content using contenteditable=true.
      Try using your own idea to make that button stat outside of the p tag.

    • @ShubhamSharma-xn1tr
      @ShubhamSharma-xn1tr Месяц назад

      @@KardanKaaal thanks a lot
      it resolved

  • @ed_badilla
    @ed_badilla Год назад

    what can we use instead of document.execCommand("insertLineBreak"); as execCommand is deprecated ???
    thanks for you hard work!

    • @quinojuan2
      @quinojuan2 10 месяцев назад +2

      Question to ChatGPT or Bard. Your life will change

  • @himanshushekatkar1410
    @himanshushekatkar1410 2 месяца назад +1

    how to deploy it as an application and responsive to operate from mobile device

  • @realnatureloveradda1811
    @realnatureloveradda1811 8 месяцев назад +3

    Sir why my local storage data not updating? Its deleted when i refresh the page.

    • @uggman9
      @uggman9 4 месяца назад

      im getting the same error

    • @princeadigwe3764
      @princeadigwe3764 2 месяца назад

      Here are my suggestions:
      1. Make sure you call the showNotes() function.
      Maybe you only defined it and did not call it.
      In the video, he calls showNotes() function immediately after defining it 👉 23:36
      2. Check your browser console to see if there are any error messages

  • @ShimmerBodyCream
    @ShimmerBodyCream Год назад +1

    thank you! What a fantastic resource.

  • @alimulla4098
    @alimulla4098 Год назад +3

    Bring more projects for beginners sir😊

  • @abdiladifmohamud5957
    @abdiladifmohamud5957 Год назад +3

    Sir localstoarge is not working for me. How can I solve it? I have followed you step by step but am unsuccessful

    • @UchechukwuBenedict-s7s
      @UchechukwuBenedict-s7s Год назад

      Capitalize the “p” in row 28 …do it like this 👇🏼
      else if(e.target.tagName === “P”)

    • @sarthakgupta124
      @sarthakgupta124 Год назад

      You would've used const notes while declaring notes at the start of the js code instead of let. use let and it will work

  • @satisfyingvideos2.016
    @satisfyingvideos2.016 8 месяцев назад +1

    hi dear when we select all and enter backspace key the delete image that we put at the bottom also removed.....why?

    • @faizanfactsyt2212
      @faizanfactsyt2212 Месяц назад

      because the image is also in the container and when you say remove the p tag in p tag there is also put the image aoutside of the container

  • @zaidmalik1981
    @zaidmalik1981 7 дней назад

    Sir I also used font-family Poppins but not seen in the results

  • @rahulshendre7089
    @rahulshendre7089 3 месяца назад

    done, thanks a lot

  • @animemangagirl3420
    @animemangagirl3420 Год назад +2

    Amazing tutorial^^ that helped a lot.
    But... How can I do a like and dislike function that actually works on all comment's boxes??? @o@

    • @Nebelkehlchen
      @Nebelkehlchen Год назад

      I am trying to think about it,. For my understanding: 1 Button for all notes together or 1 Button for each individual note?

  • @Hybridham86
    @Hybridham86 Год назад +5

    Hi there could you please provide the source code ? I'd like to compare as my local storage isn't working. Thank you.

  • @franciskp9117
    @franciskp9117 10 месяцев назад +14

    One minor bug i've noticed is that we can delete the delete button from the webpage. If done, there is no way to delete that particular note.

    • @zombiear6147
      @zombiear6147 10 месяцев назад +2

      Yes I got that too, you can add the below code in the place of input section and the functionality of the backspace will be disabled when selecting all text :
      createBtn.addEventListener("click", () => {
      let inputBox = document.createElement("p");
      let img = document.createElement("img");
      inputBox.className = "input-box";
      inputBox.setAttribute("contenteditable", "true");
      img.src = "images/delete.png";
      img.addEventListener("mousedown", (event) => {
      event.stopPropagation();
      });
      inputBox.addEventListener("keydown", (event) => {
      if (event.key === "Backspace" && isCaretAtStart(inputBox)) {
      event.preventDefault();
      }
      });
      notesContainer.appendChild(inputBox).appendChild(img);
      });
      function isCaretAtStart(element) {
      const selection = window.getSelection();
      return selection.rangeCount > 0 && selection.getRangeAt(0).startOffset === 0;
      }

    • @franciskp9117
      @franciskp9117 10 месяцев назад

      @@zombiear6147 thanks bro

    • @DAGBEAVER1995
      @DAGBEAVER1995 10 месяцев назад

      @@zombiear6147 It seems to me, that making IMG element a sibling element with relative position fixed the problem. Also appending input-box element with IMG element, and deleting both at the same time

    • @Child_club
      @Child_club 9 месяцев назад +4

      Instead of writing the lengthy code simply write contenteditable = "false" in IMG tag 😅

    • @svdden_strike
      @svdden_strike 5 месяцев назад

      @@Child_clubI didn’t work

  • @mdakhlasurrahmanrana7433
    @mdakhlasurrahmanrana7433 Год назад

    Hello Brother becous of i learn all new thing easily🙂If you don't mind make a video school management system in php plz🥺

  • @AVTerrorX
    @AVTerrorX Год назад +1

    When i added updateStorage function in createBtn section, it started to store and save the data. Till before, it wasn't storing anyting. How is this possible?

    • @mohammadayasha9499
      @mohammadayasha9499 10 месяцев назад

      beacuse we have to create element in local storage so that it can respond to any click events on notesContainer , i think .....

  • @GRDipankar-kv6pu
    @GRDipankar-kv6pu 5 месяцев назад +1

    Awesome

  • @monk_widom
    @monk_widom Год назад +1

    Sir I use button instead delete icon
    But when I write something it will start writing inside the buttons not I p tag
    ......solve this

  • @utkarshpatidar167
    @utkarshpatidar167 11 месяцев назад

    if(localstorage issue){
    You need to replace that else if condition
    You can write -
    else if (e.target.classList.contains("input-box"))
    }

    • @wafs1393
      @wafs1393 11 месяцев назад

      Can you send me your source code, mine still doesnt work

    • @utkarshpatidar167
      @utkarshpatidar167 11 месяцев назад

      @@wafs1393 ok
      After few hour i will send it to you.

    • @wafs1393
      @wafs1393 11 месяцев назад

      @@utkarshpatidar167 ok I managed to fix the issue

    • @pain7359
      @pain7359 10 месяцев назад

      hi im new to js and i am really confused can you show me your code on this ? i dont know where should i put this

    • @sourav5736
      @sourav5736 5 месяцев назад

      Thanks a lot broooo❤

  • @Islamic_wisdom535
    @Islamic_wisdom535 Год назад +3

    Thanks for the wonderful tutorial ❤
    But when i completed this project , in the first notes box delete icon is not showing and i can't be able to remove first note box 😢😢
    What to do now ?!

    • @stackunderflow6167
      @stackunderflow6167 9 месяцев назад +1

      this also my problem. I realized from another comment that contenteditable = true makes the delete button also delete-able. So for now just copy the button from another notes 😂😂

  • @anishhazra2204
    @anishhazra2204 Год назад

    sir react js ka bhi bano video please

  • @amiralisalari6863
    @amiralisalari6863 3 месяца назад

    Thanks❤

  • @Themescore
    @Themescore Год назад

    Make a video on permanent dark and light mode Website

  • @harshitvarshney3993
    @harshitvarshney3993 3 месяца назад

    is there a method to contain the notes a person writes inside the notes container coz its going out of the container
    box after reaching the end ?

    • @princeadigwe3764
      @princeadigwe3764 2 месяца назад

      Set this CSS property for the .input-box class, directly under the min-height property 👇
      height: auto;

  • @sweetdevil3647
    @sweetdevil3647 Год назад +1

    It's An Amazing Project Sir, I've Been Following You For The Few Days. And It Is Quite Good To Following You. Sir There Is Small Issue In This Nots Website That The Cursor Is Starting From The Image Tag Not From Te Starting, So How To Fix It ? And Also While Selecting All Text Using CTRL + A The All The Text With The Image Also Get Selected And While Pressing Back Space It's Also Deleting The Img

    • @ballskin
      @ballskin Год назад

      that's one big film title

  • @purbayanghosh9950
    @purbayanghosh9950 9 месяцев назад

    Using contenteditable, true makes the delete image deletable. Problem is there in the code

    • @stackunderflow6167
      @stackunderflow6167 9 месяцев назад

      ah, you are right 😂 I'm wondering for minutes why my delete button is not showing. For now, I simply copy the delete button from another notes 😅😅 but how to actually solve it?

  • @lexgim
    @lexgim 5 месяцев назад +2

    if u use ctrl + a and delete u can delete the delete button lmaooo, how do i fix this?

    • @HakanLykiaDemir
      @HakanLykiaDemir 4 месяца назад +1

      notesContainer.addEventListener('click',function(e){
      if(e.target.tagName === 'IMG'){
      e.target.parentElement.remove();
      updateStorage()
      }else{
      notes = document.querySelectorAll('.input-box')
      notes.forEach(nt =>{
      nt.onkeyup = function(){
      updateStorage();
      }
      })
      }
      nt.querySelector('img').setAttribute('contenteditable', 'false'); //this line
      })
      If you add this line of code, you can make 'img' uneditable. it will not disappear when you do a Delete operation afterwards.

    • @lexgim
      @lexgim 4 месяца назад

      @@HakanLykiaDemir i'll try this, either way I love you

    • @saadlasharii
      @saadlasharii 2 месяца назад

      @@HakanLykiaDemir its not working for me even I exactly copied your code

  • @bimokayoba
    @bimokayoba Год назад

    you can use this instead of create element
    addNoteBtn.addEventListener("click", () => {
    const newNoteHTML = '';
    noteContainer.insertAdjacentHTML("beforeend", newNoteHTML);
    // After adding the new note, update the 'notes' NodeList
    notes = document.querySelectorAll(".input");
    });

  • @vedantzanjad
    @vedantzanjad Год назад

    Thank You

  • @jayprakashyadab
    @jayprakashyadab 5 месяцев назад

    how to add the functioloty drag and drop of notes ?

  • @dadi_vlogs3254
    @dadi_vlogs3254 11 месяцев назад

    Thanks Bro.

  • @DruvAbhi
    @DruvAbhi 2 месяца назад

    why if i write someting on note thn i click enter for next line after that i click delete option it delets only single line

  • @abdoulayebah2932
    @abdoulayebah2932 Год назад

    Where is the path to download the images for this project.

  • @lklifla
    @lklifla 5 дней назад

    if i reload the page datas are deleted.what is the reason?

  • @kaleb823
    @kaleb823 Год назад

    can you help me Why the delete image is deleted by cursor.

  • @arjuno7058
    @arjuno7058 Год назад

    I followed all the instructions in the video everything works fine, but when I reload the browser the note disappear. And when I checked on the console it shows no errors. The storage doesn't work

    • @abhishekpandey9762
      @abhishekpandey9762 Год назад

      SAME PROBLEM bro

    • @bigneism
      @bigneism Год назад

      the p in
      else if(e.target.tagName === 'p')
      must be capitalized

    • @bigneism
      @bigneism Год назад

      @@abhishekpandey9762
      the p in
      else if(e.target.tagName === 'p')
      must be capitalized

    • @arjuno7058
      @arjuno7058 Год назад

      @@bigneism WOW...thanks a lot. It works 😃

    • @bigneism
      @bigneism Год назад

      @@arjuno7058 happy i could help

  • @incognito_user12
    @incognito_user12 2 месяца назад +1

    Your 20sec unstoppable ad traumatizing me 🥲

  • @the_phoenix2768
    @the_phoenix2768 Год назад

    Hi i have followed what you did with the dustbin icon but after l place java script it disappears .can you help

  • @Priya_SM-vx1mu
    @Priya_SM-vx1mu Год назад

    Why I couldn't store the data when I refresh the page.
    I have given the exact get, set Item still i couldn't store and show the data.

  • @Practice_dsa_together
    @Practice_dsa_together 3 месяца назад

    if i use getelementsbyclassname insttead of queryselectorall with the else if e.target.tagname==p condition it doesnt work. Why so

  • @emmanuelimwa2905
    @emmanuelimwa2905 Год назад

    would you please provide the link for downloading images.

  • @AN-oq6fn
    @AN-oq6fn 21 день назад

    In input box cursor is not coming please help

  • @charonissimo7683
    @charonissimo7683 4 месяца назад

    Can somebody explain me, why the function preventDefault() is using? The Key "Enter worrks anyway! Also why preventing its function and writing the same function?

  • @MyGamingEra
    @MyGamingEra Год назад +6

    Local storage note working sir🥲

    • @ltzZara
      @ltzZara 3 месяца назад

      Same 😩😣😑

  • @mdabu3331
    @mdabu3331 Год назад

    Nicee sir❤❤

  • @TamirPhillips
    @TamirPhillips Год назад +1

    I don't see the images link in the description

  • @walidomar7758
    @walidomar7758 3 месяца назад +1

    when i want to save contant without deleting everything it didn't save anything so i used this code and it works fine with me if anyone face the same problem.
    else if (e.target.tagName === "P") {
    notes = document.querySelectorAll(".input-box");
    notes.forEach(nt => {
    nt.addEventListener("keyup", updateStorage);
    });
    }

  • @priyanshushekhar7548
    @priyanshushekhar7548 9 месяцев назад

    Why my local storage function not working.
    I tried so many times but my notes are not store in storage .
    Can you help me.

  • @syedsalmanali7359
    @syedsalmanali7359 Год назад

    there is held error in javascript 1st 5th line please tell me

  • @Dibyendu-dev
    @Dibyendu-dev Год назад

    nice

  • @namangyan7647
    @namangyan7647 10 месяцев назад

    this application does not work on android?

  • @Juwonempire
    @Juwonempire Год назад +1

    Hello Sir, everything works perfectly as it show in the tutorial, but after deleting the note, I'm unable to add new note until i remove the showNotes() function.

  • @TechWithVaibhavBelekar
    @TechWithVaibhavBelekar Год назад

    google drive not work properly. Image download problem.

  • @luckydotpro5533
    @luckydotpro5533 Год назад

    Show as about a video play using js

  • @pain7359
    @pain7359 11 месяцев назад

    why is my local storage not working ? I'm new to programming i don't know much :(

  • @electroboyy2164
    @electroboyy2164 4 месяца назад +1

    can someone help me iam facing problem in this code iam unable to write or click on notes
    help

    • @AN-oq6fn
      @AN-oq6fn 21 день назад

      Same did u resolve this

  • @muhammadanas5698
    @muhammadanas5698 Месяц назад

    My function showNotes does not work when i refresh the page all notes are delete from the page someone help me to fix the problem 😔😔

  • @rakeshpandey6768
    @rakeshpandey6768 Год назад +1

    There is a problem with content editable as if user select all and delete the content in browser, delete button also gets deleted 😂😂

    • @salehabdullah-lt7fk
      @salehabdullah-lt7fk Год назад

      I noticed the same thing, do you know the solution to prevent this?

    • @17-4-4
      @17-4-4 Год назад

      did u find it?@@salehabdullah-lt7fk

  • @amalilmu3235
    @amalilmu3235 11 месяцев назад +1

    it's not working at my pc.

  • @purplestar-t7n
    @purplestar-t7n 9 месяцев назад

    what if the images are not showing

  • @Kim-d2u
    @Kim-d2u Год назад

    I have a problem of addEventListener at 5th line of js. It says
    Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')
    I've googled it but couldn't find any solutions. Can anyone help me with this

    • @quinojuan2
      @quinojuan2 10 месяцев назад

      share your code please

  • @shubhamrathod9249
    @shubhamrathod9249 5 месяцев назад

    17:08

  • @PSECO_Apoorva
    @PSECO_Apoorva 4 месяца назад

    Click button is not working sir

  • @abhisaragarwal9084
    @abhisaragarwal9084 Год назад

    Hello sir I want to know how can I make a project section for my portfolio website I need a good card design where it would be responsive and the UI should also not be that bad

  • @hiharajpoot314
    @hiharajpoot314 6 месяцев назад

    mera create note open hi nhi ho rha why??

  • @srinithi9510
    @srinithi9510 9 месяцев назад

    in notes app how to give a link for map

  • @chargeff06
    @chargeff06 2 месяца назад

    Hey, can anyone help me. My text is not getting saved😭

  • @boluwatifedavid-q2g
    @boluwatifedavid-q2g Год назад

    mine isn't working when i click on it

  • @ManasRanjanSahu
    @ManasRanjanSahu 4 месяца назад

    Localstorage not working

  • @SiwaBayek
    @SiwaBayek Год назад

    pics folder is no available

  • @CodeWithRingo
    @CodeWithRingo Год назад +1

    mine aint work

  • @technicalg6808
    @technicalg6808 Месяц назад

    11:20

  • @itspankajfun8857
    @itspankajfun8857 6 месяцев назад

    not working this java code ples

  • @coding-ka-badshah
    @coding-ka-badshah Год назад +4

    Make a full animated tekit booking website

  • @web_seriesatoz
    @web_seriesatoz Год назад

    Can you help me sir

  • @anubratamallick5502
    @anubratamallick5502 9 месяцев назад

    10:14

  • @mitamodak495
    @mitamodak495 8 месяцев назад

    You did not define the edit button

    • @deepdas7674
      @deepdas7674 7 месяцев назад

      Do it yourself just targeting the element and change the attributes of content editable that's it

  • @RonalRomeroVergel
    @RonalRomeroVergel 4 месяца назад

    i refresh and disappear :'v

  • @yangus2485
    @yangus2485 9 месяцев назад

    does the notes remains if i close and re-open the live server?

  • @amrfathi5135
    @amrfathi5135 Год назад

    Can i make it Exe

  • @esy2bear970
    @esy2bear970 Год назад

    18:33 i have problem that after i delete one note , i cant add new note anymore

  • @web_seriesatoz
    @web_seriesatoz Год назад

    Hell sir

  • @surafelfikadu4331
    @surafelfikadu4331 16 дней назад

    ... 💚💛❤🙏

  • @WR_81
    @WR_81 4 месяца назад

    hahaha, I can delete the trash can image with a simple "backspace"