How to insert an image?

4 views
Skip to first unread message

workingbird

unread,
Mar 16, 2010, 9:56:13 PM3/16/10
to Ella Project
it is a pleasure to join this group. and i start learning ella from
the application sample ellablog.

in ellablog, when i insert an image to an article, it shows box
templatetag in editor and also shows that when i browser the article.
the "box" templatetag like that:

{% box inline_standard_obdelnik_sirka for photos.photo with pk
object.photo.id %} show_title:1 show_author:1 show_description:1
show_detail:1 {% endbox %}

question:
1. how to insert an image to an anritcle in ella? does anything ( like
template or application configuration ) i missed?
2. if the image can be inserted in to article content, how how to
display the image direcotry in editor when user is in edit mode?

thanks for any advice!

---
the source code of template file (template/object.html) :
<h1>{{ object.title }}</h1>
<p>Published on {{ placement.publish_from|date }} in category: <a
href="{{ category.get_absolute_url }}">{{ category }}</a></p>
{{ object.description|safe }}
{% block content %}{% endblock %}

Almad

unread,
Mar 22, 2010, 11:49:29 AM3/22/10
to Ella Project
Hi,

sorry for late response, but we'll be back ,)

On Mar 17, 2:56 am, workingbird <zh.z...@gmail.com> wrote:
> {% box inline_standard_obdelnik_sirka for photos.photo with pk
> object.photo.id %} show_title:1 show_author:1 show_description:1
> show_detail:1 {% endbox %}

ellablog is for older version of Django, we'll fix that ASAP.

Currently, You must render the field using render template tag:

<h1>{{ object.title }}</h1>
<p>Published on {{ placement.publish_from|date }} in category: <a
href="{{ category.get_absolute_url }}">{{ category }}</a></p>

{% render object.description %}


{% block content %}{% endblock %}

> question:


> 1. how to insert an image to an anritcle in ella? does anything ( like
> template or application configuration ) i missed?

As above, box template tag should be all you need. Image must be
already uploaded.

> 2. if the image can be inserted in to article content, how how to
> display the image direcotry in editor when user is in edit mode?

Not sure what You're asking. When choosing image using markitup, You
should be able to choose from any uploaded image...or are you asking
about gallery?


Cheers,

Almad

workingbird

unread,
Mar 28, 2010, 8:20:19 AM3/28/10
to Ella Project
Thanks a lot.
for Q1:
It is works!
for Q2:
The effect that i mean is how to insert a box in a WYSIWYG mode in
editor. But currently, in the text area control, it shows the box
template tag. This is not an urgent problem, but if there is some
method can resolve it, it is a happy thing.

Almad

unread,
Apr 8, 2010, 10:45:33 AM4/8/10
to Ella Project
Hi,

> The effect that i mean is how to insert a box in a WYSIWYG mode in
> editor. But currently, in the text area control, it shows the box
> template tag. This is not an urgent problem, but if there is some
> method can resolve it, it is a happy thing.

We just pushed to github a bunch of new code that contains preview. It
should be automatically generated a second after You'll stop typing,
You can also use a magnifier button to request it (and it should
generate images properly).

Almad

P.S.: 你是中国人?我学习汉语。。。

zhen zhu

unread,
Apr 14, 2010, 2:09:49 AM4/14/10
to ella-p...@googlegroups.com
A preview will show when i stop typing in a second. It is not extactly i want, but it covers my requirement. Thanks.


to Almad:
竟然被看出来了。-_-!估计是英文太烂,呵呵。
很高兴也很欢迎你学汉语,如果有什么地方我可以帮忙的尽管说,邮件、Gtalk都行。


--
You received this message because you are subscribed to the Google Groups "Ella Project" group.
To post to this group, send email to ella-p...@googlegroups.com.
To unsubscribe from this group, send email to ella-project...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ella-project?hl=en.


Reply all
Reply to author
Forward
0 new messages