When i type my text into the Text area it shows in the preview but for some reason it’s showing with the p
tag and i don’t know why it’s doing this, try and enter a text in the textarea you’ll see what i’m talking about .
Here’s a link to my codePen : My codePen
Hello!
You need to use the dangerouslySetInnerHtml attribute.
thank you it worked !
i have one more question about the text area, it was working very fine butafter i started designing my project (Css and Bootstrap)when i click on it i can’t enter anything anymore for some reason not sure why however my code still passes the test 8 out of 8
That’s because you defined the parent div
as a modal, which applies styles for something that’s initially hidden. Remove the modal-dialog
class and it should work again .
modal-dialog
adds the pointer-events: none
which does the following:
In other words, if set to none, the element stops receiving events like key[down|up], which are required for it to write text (in the case of textarea
).
yup it worked thanks! how do you guys know all of this stuff ?! too much informations to learn how many years will it take me to get to your level
If you don’t know it, get used with the developer tools. One of the most useful ones is debugging.
For front end projects, the browser developer tools has all (almost all) the tools you’ll ever need. Though the provided link is for Mozilla Firefox, it applies to Edge, Chrome and Opera too (Safari has the same but is usually linked to an apple device, so it’s exclusive and expensive xD).
If you want, try to add the same class again and try to find the problem using the dev tools. That will help you immensely in the future .
that’s a great advice thank you ! yes i saw other developers using those tools in debugging but i didn’t know how to use it . i’ll def start learning on how to use it !