Hello all you people out there! Thanks for giving this a read. About a month ago I switched from Wordpress back to Drupal for a blog site I'm doing over at http://www.mindblogling.com(if you care to look). I found Drupal much easier to use...

I'm fairly happy with how its looking. I've tweaked Meta a bit(its a bit confusing to edit at first). So now I'm running into a couple things I'd like advise on.

1. This is my first time running TinyMCE, but when I use it, it takes the formatting out of my post and posts it as one giant paragraph. I don't like page breaking it because then it spaces the paragraphs to far apart. Is there a fix for this??

2. TinyMCE again, for some reason a post page with Tiny enabled it tiles the background image inside the editor so I'm writing on top of an image so its hard to see what I write. I disable it and the image goes away but I can't edit anything fancy like.

3. Deals with above. When I go to add post or any /node/add/ or the administer page the background image does not tile anymore and just goes straight across the top of the page. Any ideas? (I may have just thought of the fix)

The last thing is I'm wondering how to add categories into the navigation bar ala Wordpress. I'm using taxonomy_dhtml but you have to goto there to view them all. I'd like to list a couple categories(terms) in the nav bar so people can click and view all the junk classified under that term.. Is that a module, or whats the php to add into the add menu description??

Any advice, let me know. Thanks.

Comments

rogue_77’s picture

I solved #2 because I didn't see the CSS setting on the TinyMCE setting page...

I just added "; background-repeat: repeat; }" (wihout quotes) to my css to tile background image on submit pages and nothing... Its still only tiling horizontally across the top...

Thats whats annoying me most right now... any ideas??

zoinks’s picture

I too am having some trouble with TinyMCE + Meta theme using Drupal 4.7.3 and was wondering how you fared. My issue is that TinyMCE displays fine in edit mode, but when I go to view the changes made in TinyMCE it just shows up as one long paragraph. The really frustrating part is that when I go back and edit, the initial changes are still there! So it's recording TinyMCE's edits, just not displaying them.

mauryg’s picture

My experience with TinyMCE using the Meta theme in Drupal has been somewhat different. I tried to post an image or logo at the beginning of a paragraph using the standard img tag. The tag is enabled in TinyMCE and I also have the image and img_assist modules enabled. The image will post but if I add the hspace or vspace attribute to give some space between the text and the picture it doesn't work. Even more strange, it doesn't matter if I click the picture button and add the attributes via the "Appearance" section of TinyMCE or if I disable rich-text and add the attributes directly to the HTML. When I click "submit" the spacing is not there and when I go back to edit, the attributes are NOT there in the HTML tag, as if I never put them in. So TinyMCE must be stripping them out. Any ideas??

vm’s picture

yes i have an idea : )
it's not tinymce stripping them out, its the input filters.

quoted directly from the install.txt that few people take the time to read : )

CAVEATS
********************************************************************
By default, Drupal uses the 'Filtered HTML' input format for adding
content to the site and this can create conflicts with TinyMCE. It's
best when using this editor to use an input format that has all
filters disabled. What I usually do is create an input format called
'Rich-text editing' and set that as the default format for roles which
use TinyMCE exclusively. To modify your input formats go to:

Administer > input formats > configure > configure filters

If this is done properly then tinymce creations display as intended.

mauryg’s picture

Your idea doesn't seem to work. I can't "allow" the "hspace" and "vspace" ATTRIBUTES because they are not HTML TAGS like "img".
So setting up a special input format wouldn't work. Even when I check "Escape HTML tags" or I switch the Input Format to Full HTML which should allow ALL HTML tags and codes, it doesn't work. And the strange thing is that using the "Insert Image" button in TinyMCE lets me set the vertical and horizontal space in the Appearance tab. The change seems to occur in the TinyMCE editing window, but the hspace and vspace attributes don't appear in the HTML code and once I press "Submit" the values I entered are cleared.

Confused, but not Amused!

vm’s picture

all that said:

the idea above isnt mine. Its from the install text of tinymce.
The above doesnt state to add tags to another filter, doesnt state to use full html, doesnt state to do anything other then create an "empty" input filter and use this newly created filter with tinymce.

If you've not done exactly that, I'm not sure how you can state "it don't work". I just did it using the "empty" input filter that I call WYSIWYG Editor and both vspace and hspace are maintained and not stripped out.

Would you be so kind as to "try" an empty input filter for use with tinymce ?

I don't use img_assist so I can't comment on that. for images and tinymce I use IMCE.

mauryg’s picture

"NO experiment can prove me right..One experiment can prove me wrong." Being a scientist by training, I accepted your challenge. I created an "empty" Input Filter and made it the default and set it in TinyMCE. I also set TinyMCE "Verify HTML" to FALSE so it would accept full HTML pages.
When I input the image attributes (vspace and hspace), either by way of the image properties button in the rich text editor or by hand coding the HTML, they don't disappear. When I preview the page, the proper spacing is visible in the editor window, but it does NOT show in the preview window. Somehow the attributes are being ignored. When I set "Verify HTML" back to TRUE, the attributes were stripped from the HTML code. I tried disabling the image, img_assist and image gallery modules and adding and enabling the IMCE module. Same results. So part of the mystery is solved. The question now was why the event page wouldn't accept the space attributes.
I looked at the generated webpage and the space attributes WERE in the HTML code. Then I looked at the same page with IE6 and the spacing around the image was correct. I repeated this experiment on another page and on a copy of this site on another server. Same results..it worked in IE6 but not in FF 1.5 even though the HTML was the same. THEN I switched from the Meta theme to the MCVS4 theme and the spacing worked perfectly in BOTH browsers.
CONCLUSION: There is a bug in the Meta theme with the vspace and hspace attributes in Mozilla browsers (FireFox and confirmed in Opera as well). Guess I should post this to the "bugs" page for the Meta theme and to Ken's blog.

mauryg’s picture

I did some retesting and found that the same problem occurs with the Fancy, Chameleon, Goofy and MVSC4 light themes, but only in Mozilla based browsers. The "hspace" and "vspace" parameters are present in the HTML code of the node body, but they are apparently being ignored by Firefox and Opera. IE6 formats the image correctly. The editing "Input Format" is set to either "Full HTML" or "No Filter" (per suggestion by VeryMisunderstood).

So instead of using "hspace" and "vspace" or setting the parameters in the advanced image properties box in the "Rich Text" TinyMCE editor, I used the "Style" setting and set padding="5px 10px 5px 0px" (margin works as well as padding) and the spacing is now correct in all browsers for all themes. If I get really ambitious, I may hack the TinyMCE CSS code to provide a "padded image" class.

Thanks for all the help.

NOTE: Ken Collins pointed out that the Hspace and Vspace tags are deprecated in XHTML and CSS styling is the proper approach.

BrendanHodge’s picture

People have basically pointed to this already, but in regards to:

1. This is my first time running TinyMCE, but when I use it, it takes the formatting out of my post and posts it as one giant paragraph. I don't like page breaking it because then it spaces the paragraphs to far apart. Is there a fix for this??

On one of those posts that showes no line breaks, just switch the input format to "Full HTML" and it'll go back to displaying correctly.

lambert-1’s picture

Actually, when I added P and BR to Filtered HTML, TinyMCE worked just fine for Post and Preview on Mac OS X, but only worked for Post on IE7 in Windoze, and not for preview -- this is USING Full HTML. TinyMCE seems to strip the carriage returns and not replace them with anything on Preview, so Full HTML does not help.

I've now got the special input format with no filters, and I'll see how that works with IE, but the "no filters" requirement is really, really bogus, for these reasons:

1. Some users want to use raw HTML (among them me, because it's more efficient, especially with filtered HTML). However, TinyMCE doesn't respect whitespace, so the code is unreadable. Yes, I tried the pre-formatting setting, but what TinyMCE does is wrap the HTML in a pre tag, and still remove the whitespace!)

2. Some filters are important! Like Glossary, for example, or the filters that shorten URLs.

In short, we're being asked to sacrifice filters for TinyMCE. Why should we have to do that? Do we need to rewrite filters to act on true HTML? Rewrite TinyMCE? Switch to another editor? What?

vm’s picture

your questions would be better served asked in the issues thread for the tinymce project.

Theorhetically you arent sacrifing anyting. Drupal filters "out" HTML that isnt to be used. TinyMCE filters it out as well when not used within a code tag. So I'm not sure what functionality you are losing out of the box.

self created filters, would have to be created with tinymce in mind. I'd guess. you can also test other filters, and then add them to what is now an empty filter. The filtered HTML filter filters out tinymce tags. I'd venture a guess that you can add, all of the tags you want tinymce to use to the filtered HTML, however if you do so, whats the point of an HTML filter ?

I've since switched to the fckeditor which doesnt require the empty input filter and has just as much functionality as TinyMCE. My switch had nothing to do with the empty input filter issue. More of an issue with wanning support for tinymce.