Thanks for the changes, Yaw.
+1 for using markdown instead of raw html tags. This would be extremely
useful to a lot of people, and since it's been around in Enketo notes for a
while, it would expand compatibility instead of introducing a separate way.
Since Html.fromHtml()
includes so many allowed tags it could easily make
the form illegible, keeping it restricted with md is probably the better
option in my opinion.
Since font sizes could be controlled with headers (#, ##, ### etc.) the
only extension needed would be to include a custom syntax for coloring,
say, [color=red]red[/color] for a bbcode syntax - assuming your use case is
coloring individual words within a label rather than all labels as Martijn
suggested.
Tino
···
On Fri, Aug 28, 2015 at 11:18 AM, Martijn van de Rijdt wrote:Thanks Yaw,
Yes, Enketo has had limited markdown support
http://blog.enketo.org/better-notes/ since 2013 before we all agreed to
start collaborating better on these major additions to the form spec
(for performance reasons it has only been enabled in notes/readonly
questions, but I just got funding to solve that and expand it across all
labels). It would be nice if all those forms using markdown started working
in ODK Collect as well. But of course the key is here is to not have to
explain to users that there are two different ways to format labels. So
thanks for being willing to look into this further.We chose markdown (back in 2013), because it would be the least
problematic in clients that didn't support it, showing this instead of
this. It's also very easy to use.Sure, we could have chosen to sanitize html (back in 2013) but it becomes
very complex if you start supporting more complex tags with attributes such
as links. Needlessly complex (and thus fragile) in my opinion.If font-size can be supported in headings only we could just use #, ##,
tags. I question the need to change font sizes in the middle of a
sentence.
Is it important to be able to change colors of individual words? Maybe the
color requirement can be met by changing the color of the whole label,
using an appearance? I like this much better as we separate semantics from
style, in the same manner as we already do in XForms.Cheers,
MartijnOn Thursday, August 27, 2015 at 7:51:19 PM UTC-6, Yaw Anokwa wrote:
Hi Martijn,
I didn't know Enketo had Markdown. Regardless, Markdown doesn't
support color and sizing and that's what we need. I'm not aware of an
easy way to do this in Markdown, but glad to work with you to find a
suitable compromise. Maybe a BBCode-ish format?As to security, it's true that raw HTML in web clients is potentially
insecure, but Enketo can allow the limited subset of safe tags we
support using a sanitizing library, no?Yaw
Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.On Thu, Aug 27, 2015 at 9:21 PM, mri...@gmail.com wrote:
Html formatting? Enketo has been supporting markdown for over a year...
Would have been nice to match that. Html formatting is insecure in web
clients.--
Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
You received this message because you are subscribed to the Google
Groups "ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.--
Revolutionizing data collection since 2012.Enketo https://enketo.org/ | LinkedIn
http://www.linkedin.com/company/enketo-llc | GitHub
https://github.com/enketo | Twitter https://twitter.com/enketo
| Blog http://blog.enketo.org/--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.