i'm using the Django filebrowser together with TinyMCE in one of my projects.
Inserting a adv_link from the file browser into the TinyMCE popup only works
in the first TinyMCE instance.
In the second instance the link becomes #mce_temp_url#. Oddly enough, the link
is displayed correctly in the TinyMCE popup, but after hitting update to
apply the link and close the popup, it is rendered into #mce_temp_url#.
Is there any way around this problem?
Best Regards.
--
Dirk Eschler <mailto:dirk.e...@gmx.net>
http://www.krusader.org
patrick.
Hello Patrick,
thanks for your reply. In the model TinyMCE is loaded like:
class Admin:
# ...
js = (
'js/tiny_mce/tiny_mce.js',
'js/textareas.js',
)
For the filebrowser integration i followed:
http://trac.dedhost-sil-076.sil.at/trac/filebrowser/
I had some problems getting the Filebrowser popup to send the link into the
TinyMCE popup. Clicking the arrow simply did nothing. I ended up with two
different files:
- js/tiny_mce/tiny_mce_popup.js
- js/tiny_mce/tiny_mce_popup_fb.js
Both have the same content. The first file is sent when the TinyMCE popup is
loaded, the second when the Filebrowser popup comes (i've traced this with
LiveHttpHeaders). It was the only way to get it working at all.
In templates/filebrowser/index.html the second JavaScript file is referenced
this way:
{% ifequal is_popup '2' %}
[...]
<script language="javascript" type="text/javascript" src="{%
admin_media_prefix %}/js/tiny_mce/tiny_mce_popup_fb.js"></script>
[...]
{% endifequal %}
I have attached my textareas.js, which also contains the Filebrowser callback
i'm using. Please let me know if you need more information.
relative_urls : false,
remove_script_host : true,
we´re using absolute_urls and we don´t remove the script_host.
if the URL is inserted into the tinymce_popup correctly, it doesn´t
seem to be a problem with the filebrowser but a problem with
tiny_mce. therefore, you may search the tinymce forum for more details.
Am 02.03.2007 um 23:16 schrieb Dirk Eschler:
> On Freitag, 2. März 2007, patrick k. wrote:
>> we´re also using more than one tinymce instance and we don´t have any
>> problems.
>> could you give more details about your specifications, e.g. how do
>> you init tinymce?
>>
>> patrick.
>
> Hello Patrick,
>
> thanks for your reply. In the model TinyMCE is loaded like:
>
> class Admin:
> # ...
> js = (
> 'js/tiny_mce/tiny_mce.js',
> 'js/textareas.js',
> )
>
> For the filebrowser integration i followed:
> http://trac.dedhost-sil-076.sil.at/trac/filebrowser/
>
> I had some problems getting the Filebrowser popup to send the link
> into the
> TinyMCE popup. Clicking the arrow simply did nothing. I ended up
> with two
> different files:
> - js/tiny_mce/tiny_mce_popup.js
> - js/tiny_mce/tiny_mce_popup_fb.js
for the filebrowser, the installation guide says that you should use
tiny_mce_popup_fb.js with line 80 commented out, because otherwise
there´s a mix of styles and the filebrowser popup just looks awful.
this has nothing to do with the functionality of the filebrowser.
please let me know if you solved the problem ...
patrick.
>
> Both have the same content. The first file is sent when the TinyMCE
> popup is
> loaded, the second when the Filebrowser popup comes (i've traced
> this with
> LiveHttpHeaders). It was the only way to get it working at all.
>
> In templates/filebrowser/index.html the second JavaScript file is
> referenced
> this way:
>
> {% ifequal is_popup '2' %}
> [...]
> <script language="javascript" type="text/javascript" src="{%
> admin_media_prefix %}/js/tiny_mce/tiny_mce_popup_fb.js"></script>
> [...]
> {% endifequal %}
>
> I have attached my textareas.js, which also contains the
> Filebrowser callback
> i'm using. Please let me know if you need more information.
>
> Best Regards.
>
> --
> Dirk Eschler <mailto:dirk.e...@gmx.net>
> http://www.krusader.org
>
> >
> <textareas.js>
I've tried all combinations without success. Can't find anything in the
TinyMCE forum either. There are a few unsolved threads about a similiar
problem with #mce_temp_url#, but they all refer to IE only, while for me it
happens in Firefox too.
And i'm not sure if it's TinyMCE only in this case. The point is, when i enter
a Link URL in advlink manually, all is fine. It only produces the broken
#mce_temp_url# when the link was inserted through the Django filebrowser.