Page 4 of 5

Re: What do you think about Markdown?

Posted: Thu Sep 04, 2014 10:12 pm
by Pony99CA
CarstenF wrote:Btw., another very important advantage of Markdown, compared to BBCode, is that you're defining logical structure such as heading, sub-heading, etc., rather than formatting, such as font-size, font-weight, etc.
Bull pucky. :D BBCode has some semantic tags (Quote, Code, List, Image, etc.). And nothing prevents you (or phpBB) from adding other semantic BBCodes (H1, H2, Example, etc.).

Steve

Re: What do you think about Markdown?

Posted: Thu Sep 04, 2014 11:12 pm
by Lumpy Burgertushie
and by using inline css in your html equivalent, you can style those regular html tags better than you can using any type of wysiwyg editor. there is really very little you can not do with bbcode that you can do with normal html/css etc.


robert

Re: What do you think about Markdown?

Posted: Fri Sep 05, 2014 12:04 pm
by CarstenF
You're both right of course. :D

What I don't understand however, if Markdown gets supported only indirectly, that is, by translating it to BBCode first, and if the BBCodes that are built into phpBB are incomplete, for example without [h1], then how will the Markdown implementation work?

In other words, if the Markdown support would be limited to the subset of "target BBCodes" that are built into native phpBB, then Markdown support would be very incomplete, wouldn't it?

Re: What do you think about Markdown?

Posted: Fri Sep 05, 2014 12:36 pm
by JoshyPHP
I think the argument was that anything you can do in Markdown you can do in BBCodes, not that one should be implemented through the other.

From a technical standpoint, you can't really support Markdown "indirectly" because you'd have to convert the BBCodes back to Markdown to edit the post and that would be a lot of work and the result wouldn't even be faithful to the original.

Re: What do you think about Markdown?

Posted: Fri Sep 05, 2014 12:49 pm
by CarstenF
JoshyPHP wrote:I think the argument was that anything you can do in Markdown you can do in BBCodes, not that one should be implemented through the other.

From a technical standpoint, you can't really support Markdown "indirectly" because you'd have to convert the BBCodes back to Markdown to edit the post and that would be a lot of work and the result wouldn't even be faithful to the original.
Maybe I misunderstood, but this is how I interpreted brunoais' former posts in this thread:

viewtopic.php?p=13682626#p13682626
brunoais wrote:[...] What I think we can do is to allow having a MarkDown to BBCode client side js translator that allows the user to write in MarkDown instead of BBCode and then it translates the MarkDown to BBCode. If the messages are simple like the ones we have been using on github, it should work well for most forum posts that require only very simple formating.
viewtopic.php?p=13687071#p13687071
brunoais wrote:[...] I think that if someone would like to make an extension parser for MD for phpBB it's perfectly OK! For starters, I think it would be the best to have it to parse the MD into BBCode instead of MD to HTML due to how phpBB's BBCode parser work and because the BBCode parser has the tendency to make changes to the output forcing some of the MD to be lost.
:? :?:

Re: What do you think about Markdown?

Posted: Fri Sep 05, 2014 1:00 pm
by JoshyPHP
Oh ok, I thought you were addressing the most recent posts from Pony99CA.

That thing about translating MD into BBCodes doesn't seem viable IMO. You might as well disable BBCodes altogether and just plug a Markdown parser somewhere in the rendering process. That'd be less work.

Re: What do you think about Markdown?

Posted: Sun Sep 14, 2014 10:37 am
by callumacrae
CarstenF wrote:What I don't understand however, if Markdown gets supported only indirectly, that is, by translating it to BBCode first, and if the BBCodes that are built into phpBB are incomplete, for example without [h1], then how will the Markdown implementation work?
It won't, if you do it like that.

Re: What do you think about Markdown?

Posted: Fri Oct 02, 2015 12:47 am
by peopleopinion
As I said into another post:
peopleopinion wrote:What about to implement a real full rich text editor with icons instead bbcodes buttons?
There are plenty good solution even extensions that could be implemented into the core to replace bbcode system once for all.
Of course giving admins the possibility to add their own buttons and related functions when needed. But if the rich text editor is complete nobody will need to add new buttons in it.
Actual markdown based on BBcodes is old school IMHO: retirement time ;) .

Re: What do you think about Markdown?

Posted: Fri Oct 02, 2015 7:50 am
by Ger
Well, I haven't seen a good RTE in combination with a forum. IPB has it, but IMO it fails with more complex stuff like cutting quotes in several parts to respond to those parts separately. Some other issues like custom built BBcodes for LaTeX are also quite a headache.

The problem with RTE's is that you don't want to allow plain HTML due to security issues. Therefore you need to take control with something like Markdown or BBCode.

Re: What do you think about Markdown?

Posted: Fri Oct 02, 2015 9:24 am
by peopleopinion
Ger wrote:Well, I haven't seen a good RTE in combination with a forum. IPB has it, but IMO it fails with more complex stuff like cutting quotes in several parts to respond to those parts separately. Some other issues like custom built BBcodes for LaTeX are also quite a headache.

The problem with RTE's is that you don't want to allow plain HTML due to security issues. Therefore you need to take control with something like Markdown or BBCode.
Oh... Understood.
But the downside is that for some bbcodes normal users do't deeply understand how they work, so they don't use them or if they do sometimes they make a mess. It will not happen if the editor is RTE because editing is visuale and what the user sees is what (s)he really gets after publishing.
It's an eternal war between security and usability...
Maybe there is a way to limit the use of the HTML to only that tags that aren't dangerous for security and eliminate bbcodes once for all.

Re: What do you think about Markdown?

Posted: Fri Oct 02, 2015 10:19 am
by Ger
Well, it isn't just about tags; it's about attributes as well. For example: one can abuse JS-events like <img onmouseover="javascript:destroymybrowser();" src"verysexyimage.jpg" />

Of course JS events are easily blacklisted, but with the power of HTML5 comes a lot more. You could hook into the scripts that read stuff like data-some-identifier-unique-to-this-site etc. Getting all of this secure will result in building a complete HTML interpreter in PHP, almost like a rendering engine. That's brutal overkill for most situations where people post messages with minimal or BBcode at all, apart from basic links and quotes. I reckon such messages are about 95-98% of all bulletin board messages in the world.* However, you need to push all messages through this heavy interpreter to be secure.

I know it's an eternal ware between security and usability, but that goes for locking your home as well. It's much more convenient when you can leave your door open so you can easily walk in your home when you have your arms full with bags from the grocery store. However: most people choose to lock their doors just to be on the safe side. ;)


*) this is just my gut feeling, not based on statistics.

Re: What do you think about Markdown?

Posted: Fri Oct 02, 2015 10:46 am
by Arty
Ger wrote:Well, I haven't seen a good RTE in combination with a forum.
XenForo uses Redactor that works very well.

Re: What do you think about Markdown?

Posted: Fri Oct 02, 2015 11:43 am
by Ger
I have tried it on their demo board. Quoting results in this:
Image

While this makes it convenient to cut quotes in parts, this is of course not entirely a RTE; for complex stuff it seems to fall back to BBcode. (disclaimer: haven't played with it very much). That obviously has it advantages, but seems like only a half solution.

Re: What do you think about Markdown?

Posted: Fri Oct 02, 2015 12:57 pm
by Arty
Ger wrote:I have tried it on their demo board. Quoting results in this:
Image

While this makes it convenient to cut quotes in parts, this is of course not entirely a RTE; for complex stuff it seems to fall back to BBcode. (disclaimer: haven't played with it very much). That obviously has it advantages, but seems like only a half solution.
But its good enough and way better than weird markdown or other systems. You can see exactly how post looks like, except for few bbcodes that are displayed as bbcode, such as "quote" or "code" tags.

With markdown post never appears the same as you type it. It formats text that you don't want to be formatted. Its weird and illogical.

Re: What do you think about Markdown?

Posted: Fri Oct 02, 2015 1:10 pm
by Ger
I totally agree with you regarding to Markdown. I'm always lost counting the quote marks, dashes, etc. I quite dislike it and a good RTE editor would be way better.
However, every solution with RTE and forums I've seen also has it's quirks and/or drawbacks.