Marknote | Markdown Note Taking
kandi X-RAY | Marknote Summary
kandi X-RAY | Marknote Summary
Marknote supports HTML/JavaScript in notes, making the possibilities endless.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Marknote
Marknote Key Features
Marknote Examples and Code Snippets
Community Discussions
Trending Discussions on Marknote
QUESTION
I want to add an event to the "Important" link i.e. When One user clicks the "Important" link, the corresponding card color should be changed and saved in the localstorage but, when I am accessing that DOM file which I passed as a string, I am unable to do it. For e.g. - I can't access to document.getElementsByClassName("noteCard")
in function markNotes(index)
. But at the same time
console.log("Color is not applied")
executes successfully. If I am adding document.body.style.backgroundColor = "lightblue";
then also body color changes accordingly, but the I want to change the background color of the card with class "noteCard" only. I am really stuck with it.
Below is my HTML code
...ANSWER
Answered 2020-Jul-20 at 10:32You were missing index
while fetching element inside markNotes
:
QUESTION
I have passed my DOM element as a string here.
...ANSWER
Answered 2020-Jul-20 at 08:12There is nothing wrong with accessing the DOM. I think you are trying to access an element that is not on the page.
Are you displaying the html
on the page at the end of showNotes
function?
You can do so by: someDiv.innerHTML = html
.
to access a specific card (not always the first one) maybe you can set an id for each card with its index example: card-${index}
, then accessing it with .getElementById
You are storing notesObj
as an array, and in the loop (in showNotes
) you are creating a static style. So you need to update the object styles in notesObj
So instead of setting the style, create a styles object:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Marknote
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page