Images, WYSIWYG and Drupal
September 28, 2007 10:53 PM   Subscribe

Trying to get TinyMCE, IMCE and Drupal working together to post inline images...

Problem

For some reason, while the TinyMCE toolbar shows up and I can insert an image into the textarea, the image does not appear in the previewed or submitted post.

For example, in this page, there should be the following image in between the bulleted list and the text "More test text!". This image appears in the textarea when editing the page. When I preview or submit, the image does not appear in the article.

Details

I'm running Drupal 5.1, PHP 5.2.2, and Apache 1.3.33.

I added the TinyMCE module, TinyMCE 2.1.2, and IMCE.

I enabled image uploading in Administer > Site Configuration > IMCE

Options?

Is there a way to get HTMLArea/Xinha or another WYSIWYG module for Drupal to work with Safari, such that images can be inserted into an article?
posted by Blazecock Pileon to Technology (7 answers total)
 
Your "TinyMCE 2.1.2" doesn't go where you want it to.
posted by philomathoholic at 11:34 PM on September 28, 2007


Response by poster: Fixed link
posted by Blazecock Pileon at 11:38 PM on September 28, 2007


Best answer: The question that immediately comes to mind is: What input format have you selected for the post? If it's the out-of-the-box default of filtered HTML, you have to add the img tag to the list of permitted tags or switch to Full HTML filter.

And does this happen only with Safari, or is that part of your question sort of a secondary add-on?
posted by romakimmy at 3:26 AM on September 29, 2007


Seconding romakimmy's suggestion. There's no img tag in the source code, so it must have been filtered out somewhere along the line.
posted by aparrish at 7:36 AM on September 29, 2007


Response by poster: And does this happen only with Safari, or is that part of your question sort of a secondary add-on?

Secondary add-on.

You were absolutely correct about the img tag being stripped.

Adding the tag to the Administer > Site Configuration > Input Formats list makes it work again. Cheers!
posted by Blazecock Pileon at 9:50 AM on September 29, 2007


In general when dealing with rich HTML editors, it's best to not filter the HTML at all. In the drupal admin menus, you can add a new "content type", with no filters, and call it "Raw HTML". Then use that by default.

Besides stripping out img tags, you will find weird paragraph breaking due to newlines being converted to <br> and <p>
posted by kamelhoecker at 10:38 AM on September 29, 2007


Tiny MCE and Safari do not play well together, even if you have the input set correctly to full HTML. Use Firefox.
posted by fourcheesemac at 5:04 PM on September 29, 2007


« Older Home Audio question   |   It's possessed! Newer »
This thread is closed to new comments.