Monday, January 1, 2018

Django: text, font, and style

Apparently I completely misunderstand the built in template tags {% autoescape &} and {% safe %}. Either they don't do what I expect, or I can't get them to do what I expect. But what I am trying to do is not at all unusual, so this post is all about learning from the community what are the best practices for getting this done.


Simply put, I want to be able to put some style on any arbitrary text in any arbitrary article on my site.


I have tried the version of TinyMCE built into Mezzanine. I found it both too limiting and too complex for my purposes. I also think the idea of using a wysiwg editor just to make a single word <b>bold</b> or with <font: color=yellow> highlighting is pretty heavy handed. There must be a better way. What is it?


I did stumble across a snippet for a custom template tag, https://www.djangosnippets.org/snippets/1242/, but it is 9 years old and has only one comment in all that time. Although the comment is favorable, that's hardly what I would call a large and happy current user base. On the flip side, I assume this is not very different from how {% url %} works, so maybe it can be hacked to do what I'm talking about?


I also looked at djangopackages, and the results were disappointing. Django-text looked promising, but the author wrote me that it is no longer in active development :-(


So, all you experts out there, how do you solve this problem? Thanks.


p.s. I am comfortable with html, but CSS and javascript, not so much. Doesn't mean I can't or won't learn if that's your go to option, I'm just letting you know where I am.


p.s.s. HAPPY NEW YEAR TO ALL!

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0b700a53-7812-4a64-a690-0f606980179f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment