How Do I Get An API Key?

I’m considering supporting both Textile and Markdown on a current project. I would prefer not forcing users to choose one or the other. Is there a way to auto-detect which the user is using? How would you go about this? I’d like to find / develop both a JavaScript and a PHP solution so I can provide live previews as well as process the user input on the server-side.

2 ANSWERS

16 febrero, 2017 a las 9:52 am admin

Auto-detection, I don’t know, both are based on “natural” typing.
Perhaps you can ask the user to choose a format, with a pair of radio-buttons or something.

16 febrero, 2017 a las 9:52 am admin

Consider that users might only use one specific syntax element in a posting, so you’d have to check for everything. Looking for “h1.” obviously only works if the user uses exactly that element.

It’s pretty easy with things like headers, but consider that markdown formats *this* as this and Textile will convert that to this instead. So you’d have ambiguous syntax constructs that would yield different results in each language.

I’d suggest going with a user choice. Try to find out what syntax is generally preferred by your users (or you), offer an “use x instead of y” checkbox for those who want the other choice.

Viendo 2 respuestas - de la 1 a la 2 (de un total de 2)

You must be logged in to reply to this topic.