# Anyone got page\_attachments + tinymce to work?

**URL:** <https://www.ruby-forum.com/t/anyone-got-page-attachments-tinymce-to-work/110781>\
**Category:** Radiant CMS\
**Created:** [July 30, 2007, 9:21pm UTC](https://www.ruby-forum.com/t/anyone-got-page-attachments-tinymce-to-work/110781 "2007-07-30T21:21:35Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![soster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/848f3c/32.png) [@soster](https://www.ruby-forum.com/u/soster)\
**Post date:** [July 30, 2007, 9:21pm UTC](https://www.ruby-forum.com/t/anyone-got-page-attachments-tinymce-to-work/110781/1 "2007-07-30T21:21:35Z")

</div>

I’m noticing that when you have the tinymce extension installed the page  
attachments interface stops showing up. The tags still process  
correctly  
but you lose the UI to upload images on each page. Has anyone gotten  
around  
this issue? I’m still learning the framework and don’t even know the  
best  
way to trace through this and figure out where/how the tinymce extension  
is  
clobbering the page\_attachments.

Thanks a million,  
Shawn Oster

---

<div class="post-metadata">

**Author:** ![soster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/848f3c/32.png) [@soster](https://www.ruby-forum.com/u/soster)\
**Post date:** [July 30, 2007, 9:27pm UTC](https://www.ruby-forum.com/t/anyone-got-page-attachments-tinymce-to-work/110781/2 "2007-07-30T21:27:36Z")

</div>

I had the same problem. I think if you maybe make a page\_attachments  
under  
the new extensions folder added, it might work?

I just uninstalled tinymce, and got on with my life. But would be  
interested in continuing.

Kyle

On 7/30/07 12:20 PM, “Shawn Oster” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Radiant mailing list  
> Post: removed\_email\_address@domain.invalid  
> Search: [http://radiantcms.org/mailing-list/search/](http://radiantcms.org/mailing-list/search/)  
> Site: [http://lists.radiantcms.org/mailman/listinfo/radiant](http://lists.radiantcms.org/mailman/listinfo/radiant)

–

Kyle Daigle  
DigitalWorkbox  
removed\_email\_address@domain.invalid  
C: 860.324.8173

---

<div class="post-metadata">

**Author:** ![soster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/848f3c/32.png) [@soster](https://www.ruby-forum.com/u/soster)\
**Post date:** [July 30, 2007, 9:38pm UTC](https://www.ruby-forum.com/t/anyone-got-page-attachments-tinymce-to-work/110781/3 "2007-07-30T21:38:40Z")

</div>

i did.

problem is that both extensions overwrites  
/app/views/admin/page/edit.rhtml  
template. just metge that template into 1 folder and it should work.

e.g. if you do not see page\_attachments then your tiny\_mce overwrites  
them  
so you should merge it into  
/vendor/extensions/tiny\_mce/app/views/admin/page/edit.rhtml

---

<div class="post-metadata">

**Author:** ![soster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/848f3c/32.png) [@soster](https://www.ruby-forum.com/u/soster)\
**Post date:** [July 30, 2007, 11:37pm UTC](https://www.ruby-forum.com/t/anyone-got-page-attachments-tinymce-to-work/110781/4 "2007-07-30T23:37:03Z")

</div>

page\_attachments does not override the edit.rhtml, it uses the built-in  
facilities (aka “facets lite”) for inserting partials above the  
buttons. However you would be correct in pointing out that overriding  
edit.rhtml (probably what tiny\_mce does) would break page\_attachments.

Sean

---

<div class="post-metadata">

**Author:** ![soster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/848f3c/32.png) [@soster](https://www.ruby-forum.com/u/soster)\
**Post date:** [July 31, 2007, 12:02am UTC](https://www.ruby-forum.com/t/anyone-got-page-attachments-tinymce-to-work/110781/5 "2007-07-31T00:02:06Z")

</div>

So perhaps a better approach would be to “fix” the tiny\_mce extension to  
do  
the same thing that page\_attachments is doing? Seems like two  
attachments  
should be able to co-exist without manual tweaking.

If you can give me a pointer as to where to look in the page\_attachment  
extension for how it’s using the “facets lite” I’ll attempt to fix up  
tiny\_mce to play nicely. Seems the original owner has since switched to  
mephisto and not sure he’s still maintaining it.

Shawn

---

<div class="post-metadata">

**Author:** ![soster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/848f3c/32.png) [@soster](https://www.ruby-forum.com/u/soster)\
**Post date:** [July 31, 2007, 1:17am UTC](https://www.ruby-forum.com/t/anyone-got-page-attachments-tinymce-to-work/110781/6 "2007-07-31T01:17:11Z")

</div>

Shawn,

I think the key would be to modify as little of the “edit” template as  
possible, focusing on its partials. This was easy with  
page\_attachments, because I had to insert a partial, not modify one.  
Perhaps you could focus on \_part.rhtml and see if that will suffice.  
Also be sure to make use of the ‘include\_stylesheet’ and  
‘include\_javascript’ helper methods instead of inlining your styles and  
scripts. These helpers can be called at any point – either in a filter  
you add or in any view template/partial, as they are evaluated only in  
the layout (which gets evaluated last).

There’s two primary methods of modifying the interface using ‘facets  
lite’ - one is adding any partial above the button area (below the  
tabbed page-part interface). The second is adding fields to the ‘meta’  
area that includes the slug and breadcrumb. The reasoning is that John  
and I felt those were the two parts of the UI that people would need to  
modify most - attributes of the page object and other, more complicated  
controls. It was kind of a compromise from the infinite flexibility  
that the ‘facets’ branch attempts to give you.

Hope that helps!

Sean

---

<div class="post-metadata">

**Author:** ![soster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/848f3c/32.png) [@soster](https://www.ruby-forum.com/u/soster)\
**Post date:** [July 30, 2007, 9:55pm UTC](https://www.ruby-forum.com/t/anyone-got-page-attachments-tinymce-to-work/110781/7 "2007-07-30T21:55:42Z")

</div>

Ahh, sneaky, thanks for the help!

Shawn

---

<div class="post-metadata">

**Author:** ![soster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/848f3c/32.png) [@soster](https://www.ruby-forum.com/u/soster)\
**Post date:** [August 29, 2007, 1:07pm UTC](https://www.ruby-forum.com/t/anyone-got-page-attachments-tinymce-to-work/110781/8 "2007-08-29T13:07:57Z")

</div>

I have looked at the TinyMCE extension and rewritten it to make it work  
with all versions of Radiant and other extensions. Unfortunately, I  
don’t have the original ZIP-file with all files anymore. Could anyone  
send this to me or point me to a subversion repository where I can diff  
my version with. It seems that the website of the extension is offline.

Edwin
