Build a Markdown Previewer - can't update components

Build a Markdown Previewer - can't update components
0

#21
  1. that won’t open up a new tab,
  2. plain html is perfectly valid in a markdown document.
  3. it’s the only way to do it. markdown standard only allows the title and href attributes, when using the link format.

#22
  1. The challenge is to figure it out and make it open up in a new tab. (It can)
  2. I understand, but that is not what was asked in the user story.
  3. No, it is not the only way to do it. This forum uses markdown and links open up in a new tab, the example project also opens it’s link in a new tab, in addition I’ve also made it work. Like I said earlier, you have to customize the default render of marked.js. to make it work.

#23
  1. yes
  2. the user story simply asked that the link open in a new tab. That would allow any valid markdown, including plain html.
  3. that’s interesting but non-standard behavior. how is it done without specifying target?

Do you really think the intention was to have the student modify marked.js source code?


#24

Your rendered html will have the target="_blank" attribute, but you have to figure out how to make marked.js generate that attribute.
And no, you will not be modifying the marked.js source code, just use the options/extensions they provide. Read the link I shared above.


#25

If you inspect that link you just made with Chrome dev tools you’ll see that there is no target attribute.
I looked at all those options and didn’t see it.


#26

More hints : the option of interest is renderer, that option takes a value of an object as you can see in the docs. After you find the property on that object you want to change, you make a new instance, modify it after figuring out the arguments to pass and pass it back to your marked call as an optional argument. And remember, google is your friend. Best of luck.


#27

sry Mr.Harplinge , i think dereje is right about modifying the render.