The-WebOps-Club / fest-api

An API implementation for Saarang Shaastra like fests, including ERP and Mainsite and Mobile interface
12 stars 11 forks source link

Markdown not working for Tags #74

Closed shahidhk closed 10 years ago

shahidhk commented 10 years ago

Seems like issue after content editable divs. Older markdown tags and all are cupping now

Phoenix25 commented 10 years ago

I'm looking into it. Need a management script. Just tell me of there is any cup for new posts. On 10 May 2014 17:58, "Shahidh K Muhammed" notifications@github.com wrote:

Seems like issue after content editable divs. Older markdown tags and all are cupping now

— Reply to this email directly or view it on GitHubhttps://github.com/The-WebOps-Club/fest-api/issues/74 .

shahidhk commented 10 years ago

Saving HTML as it is into comments & posts? No, you cannot do that. That is why we have markdown. If we change something later all the older posts and comments will cup. @AbdealiJK , are you okay with saving HTML in database?

Phoenix25 commented 10 years ago

Understood. but nothing we have now will change much at max we may have to change it's layout which can be handled with classes.

AbdealiLoKo commented 10 years ago

Sadly, I can't think of any better option. If using content editable divs, you have to render html. And people can copy paste html directly into the div also. Hence, we have to save html ... cuz a lot of stuff will cup without that, and we will have half html half markdown, which is chaotic.

A bug i found : @Sai praveen : We need to make checks for this : I made some random thing contentEditable using mani's trick and copied """ Did you mean: localhost8000.-com http://localhost8000.com/ """ into that. After that, anything i typed was biiig and blue and bold. If people copy stuff from other browsers, we need to remove all "span", "b", "i", bold, font tags and stuff when they paste it in the div. And as we dont have RTE, they will never be able to "get out" of that style. So, yeah ... need to remove all styling html tags like h1, h2, and so on ... and also,remove all style attributes. I guess we can keep ul, li tags ...

Also, with current system. how do u make something bold ? Earlier ddd made it bold

On Sat, May 10, 2014 at 11:15 PM, Sai Praveen B notifications@github.comwrote:

Understood. but nothing we have now will change much at max we may have to change it's layout which can be handled with classes.

Reply to this email directly or view it on GitHubhttps://github.com/The-WebOps-Club/fest-api/issues/74#issuecomment-42748954 .

Phoenix25 commented 10 years ago

It dosent become bold anymore?? Thats not supposed to happen. The standard markdown should also work and will be pre processed to html. I'll take a look and if needed add an rte or override paste functionality. On 11 May 2014 07:54, "AbdealiJK" notifications@github.com wrote:

Sadly, I can't think of any better option. If using content editable divs, you have to render html. And people can copy paste html directly into the div also. Hence, we have to save html ... cuz a lot of stuff will cup without that, and we will have half html half markdown, which is chaotic.

A bug i found : @Sai praveen : We need to make checks for this : I made some random thing contentEditable using mani's trick and copied """ Did you mean: localhost8000.-com http://localhost8000.com/ """ into that. After that, anything i typed was biiig and blue and bold. If people copy stuff from other browsers, we need to remove all "span", "b", "i", bold, font tags and stuff when they paste it in the div. And as we dont have RTE, they will never be able to "get out" of that style. So, yeah ... need to remove all styling html tags like h1, h2, and so on ... and also,remove all style attributes. I guess we can keep ul, li tags ...

Also, with current system. how do u make something bold ? Earlier ddd made it bold

On Sat, May 10, 2014 at 11:15 PM, Sai Praveen B <notifications@github.com

wrote:

Understood. but nothing we have now will change much at max we may have to change it's layout which can be handled with classes.

Reply to this email directly or view it on GitHub< https://github.com/The-WebOps-Club/fest-api/issues/74#issuecomment-42748954

.

— Reply to this email directly or view it on GitHubhttps://github.com/The-WebOps-Club/fest-api/issues/74#issuecomment-42760436 .

AbdealiLoKo commented 10 years ago

Hm.

So, now im a bit confused. Do we have markdown + div or only one ?

Phoenix25 commented 10 years ago

So we're storing raw html i guess... fixed markdown functionality @shahidhk use python manage.py migrate_posts to parse all older posts