Problem with wysiwyg editor

Avatar - May 27, 2009 - 02:16
Project:Pagination (Node)
Version:6.x-1.x-dev
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hello, I am using wysiwyg editor with enabled TinyMce for Full HTML input format. The problem happens with the TOC, The first and possibly the second links in the TOC are ok, but anything after that isprobably parsed in an incorrect manner. The content itself with html tags appear in the TOC.

Since I don't know anything about coding and rather new to drupal, i would be happy if someone helps.Attached to this post is an image of the problem

AttachmentSize
pagination.jpg145.07 KB

#1

mundanity - May 28, 2009 - 05:30

Hi there,

Can you copy and paste the full text of your article (there should be a show source link in tinymce), or just disable tinymce temporarily and copy the contents and upload it here. We'll see if we can figure out what's going on.

#2

Avatar - May 28, 2009 - 19:27

I clicked the "disable rich-text" link. Here is the source code, the text is just some dummy testing text that I repeated over and over:

Chapter 1. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.Please choose the appropriate genre for your article. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.Please choose the appropriate genre for your article. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.Please choose the appropriate genre for your article. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.Please choose the appropriate genre for your article. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.

[ header = chapter 2 ]

Chapter 2. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.Please choose the appropriate genre for your article. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.Please choose the appropriate genre for your article. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.Please choose the appropriate genre for your article. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.Please choose the appropriate genre for your article. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.

[ header = chapter 3 ]

Chapter 3. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.Please choose the appropriate genre for your article. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.Please choose the appropriate genre for your article. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.Please choose the appropriate genre for your article. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.Please choose the appropriate genre for your article. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.

[ header = chapter 4 ]

Chapter 4. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.Please choose the appropriate genre for your article. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.Please choose the appropriate genre for your article. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.Please choose the appropriate genre for your article. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.Please choose the appropriate genre for your article. You can select multiple options by holding down "Ctrl" key on the PC or "Command" Key on the Mac.This option must be made.

#3

Avatar - May 28, 2009 - 23:52

The tags don't show here above because they were parsed

#4

mundanity - May 29, 2009 - 00:18

Hi there,

Can you save that (with the tags) in a text file and upload it (attach as file)? I'll need the tags to run through a few tests of the parsing. Thanks!

#5

Avatar - May 29, 2009 - 00:35

sure, here it is

AttachmentSize
code.txt 3.4 KB

#6

Avatar - May 30, 2009 - 13:40

Any Hope?????

#7

mundanity - June 1, 2009 - 14:54

Hey there,

Sorry was busy moving this weekend, I'll try take a look at this this week. I don't see any markup there that looks particularly troublesome, but I'll confirm as soon as I have a moment.

#8

mundanity - June 2, 2009 - 04:49
Version:6.x-1.5» 6.x-1.x-dev
Status:active» fixed

Hi there,

This should be fixed now in the dev version (it updates every 12 hours, so whenever the date changes on the dev version to June 1st/2ndish). Let me know if it's still causing you problems, but I believe it should work.

#9

Avatar - June 2, 2009 - 17:56

Thanks, much better now but there seems to be still some glitches:

the pagebreak tag doesn't seem to work , it displays with the text content as if part of it, though I can do with the header tag alone. Attached to this message is the code of a test I did with the pagebreak

there's another thing, the header tag is working good, but it seems that if I copy pasted text from somewhere else,it also adds its own "span" tag with all its properties which seems to prevent from the header tag from displaying correctly. In other words, if I copy paste text, I have to go into the source code and remove the span tag and its properties.
Is there a way to avoid this?
Should I just tell users not to copy paste text and write the text themselves , though that would be difficult for some?

The second file attached here shows the code of the incorrectly displayed header tag because of "span" . When I removed "span" after uploading the file, everything worked fine

AttachmentSize
pagebreak.txt 3.69 KB
header.txt 2.95 KB

#10

mundanity - June 6, 2009 - 16:30

Hello,

The June 3rd version of dev should handle the pagebreak issue. I'm still thinking about the span issue. I'll probably end up rolling in a fix for that soon, I'm just not comfortable with trying to parse all sorts of HTML edge cases, but I imagine the <p><span> thing will come up frequently enough.

#11

sersim - June 6, 2009 - 18:15

Hello,
you could consider using the function _pagination_xhtml_unterminated_elements() I posted in this issue:
http://drupal.org/node/360292

I have used it since January with no problems.

#12

Avatar - June 6, 2009 - 18:42

hello

Thanks for your efforts, I found a way to avoid pasting the same font style and the usage of span tag. I just enabled the "paste from text" and "paste from word" features of TinyMCE as told by Sun here: http://drupal.org/node/480194

#13

System Message - June 20, 2009 - 18:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.