Hello, I want to use Markdown-it in my phoenix, but I have a problem with Phoenix Tag, supposing that I don’t use phoenix tag and write normal html like this:
I have no problem until I want to use normal html , as you see this code works like this forums markdown editor .
but I have a problem when I use phoenix tag like this:
and now my code doesn’t work like original html , please see the pic:
it shows me a text but I need it to show me the markdown demo like the first code.
if I write the original html, it will work but now it is blow pic:
how can I fix this textarea and show the demo of markdown? in the meantime I need much security in this!!
So if you use a textarea in manually crafted HTML, it works as you expect it, while a textarea created by phoenix formhelpers does not?
Have you diffed the created Vs. The crafted HTML to be able to see the difference? Have you handcrafted a full form already or only standalone textarea?
Why is your output a textarea? That should indeed show you the html but if you are not wanting the html then… Your original code did not use a textarea as the output.
I think there is a difference in both of them I mean original html and Phoenix tag, Because it works in original html but it doesn’t work in the Phoenix tag.
I didn’t know what you said, I am sorry, but I don’t understand why they are different, it seems that phoenix tag filters html
I told you, that in the original version you are using a div in the original and a textarea in the phoenix version, you told me that doesn’t matter, so I asked you, if I understand you correctly that it works with a handcrafted version that uses textarea, and now you tell me that you do not know?
Just stick to a div as a target for the rendered HTML, textareas are an input element, nothing you display rendered HTML with.
As I said already, div != textarea. Unless you have proven that a textarea works in handcrafted HTML, I will assume that this is the culprit.
And diff is a commandline tool in unixes that compares files and shows the actual differences, line by line.