paste from word - "Normal" paragraph problem

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
davidascher
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 135
Joined: Tue Feb 28, 2006 3:23 pm

paste from word - "Normal" paragraph problem

Post by davidascher » Tue Aug 19, 2014 7:39 pm

JCE Editor 2.4.2 on Joomla 3.3.3.

Previous behavior was that any "Normal" paragraph was encoded with class="MsoNormal". Since upgrading to V 2.4.2 of the editor, the paragraphs are assigned no class at all. This causes a ton of problems.

I am unable to find any configuration parameter or code that controls this encoding. Where is it?

User avatar
numinousmedia
Joomla! Ace
Joomla! Ace
Posts: 1567
Joined: Fri Dec 16, 2011 6:13 pm
Location: Barberton, OH
Contact:

Re: paste from word - "Normal" paragraph problem

Post by numinousmedia » Tue Aug 19, 2014 8:42 pm

Usually it's a good idea to avoid bringing in extra classes when you copy and paste text from Word or another website. Is your template's paragraph styling all based on this MsoNormal class?
Ryan
Frontend Developer and Joomla Professional
Ethode Website Development: http://www.ethode.com
Personal Site: http://www.numinousmedia.com

davidascher
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 135
Joined: Tue Feb 28, 2006 3:23 pm

Re: paste from word - "Normal" paragraph problem

Post by davidascher » Tue Aug 19, 2014 8:51 pm

May I suggest that a major change in the way the most commonly used editor, JCE Editor, works with pasting WORD docs - after several years without any clear notice or workaround - is not the way one would would expect software to be managed in 2014.

My client creates and formats all their docs in Word. They have been pasting them into Joomla from Word without a problem for years. They use the "normal" paragraph style (which has always been encoded in HTML as class="MsoNormal" by JCE Editor) as well as a few dozen other paragraph styles for their content styles.

It is NOT a good idea for the JCE Editor to suddenly decide to drop JUST the MsoNormal style - all the other styles come in just fine. I am having some difficulty comprehending what kind of thought processes would lead to this decision. Something like "since this works just fine, let's break it and see if anybody notices"???

User avatar
numinousmedia
Joomla! Ace
Joomla! Ace
Posts: 1567
Joined: Fri Dec 16, 2011 6:13 pm
Location: Barberton, OH
Contact:

Re: paste from word - "Normal" paragraph problem

Post by numinousmedia » Tue Aug 19, 2014 8:56 pm

Fortunately, if you dig into your JCE Profile, you can tell JCE exactly how much to clean up the text/code that is being pasted in. Specifically, I'd look at:

JCE Profile -->Plugin Parameters Tab -->Clipboard options

This area should have just about all the settings you need to restore your JCE to what you need it to be.
Ryan
Frontend Developer and Joomla Professional
Ethode Website Development: http://www.ethode.com
Personal Site: http://www.numinousmedia.com

davidascher
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 135
Joined: Tue Feb 28, 2006 3:23 pm

Re: paste from word - "Normal" paragraph problem

Post by davidascher » Tue Aug 19, 2014 9:14 pm

I just found the Changelog and it says - for Version 2.3.2
Fixed : Class stripping when pasting from Word etc.

It looks like somebody lost this fix somewhere along the way. Now I am looking for an older version of the editor that HAS the fix.
Fortunately, if you dig into your JCE Profile, you can tell JCE exactly how much to clean up the text/code that is being pasted in. Specifically, I'd look at:

JCE Profile -->Plugin Parameters Tab -->Clipboard options

This area should have just about all the settings you need to restore your JCE to what you need it to be.
That would be great - except that "Strip Class Attributes" tooltip says
Strip Class Attributes::Set whether or not class attributes are stripped when pasting. When pasting from Word, mso classes are always removed, regardless of this setting.
Why this should be the case is not at all clear to me.

User avatar
numinousmedia
Joomla! Ace
Joomla! Ace
Posts: 1567
Joined: Fri Dec 16, 2011 6:13 pm
Location: Barberton, OH
Contact:

Re: paste from word - "Normal" paragraph problem

Post by numinousmedia » Wed Aug 20, 2014 1:14 am

I'm not a JCE developer, but, I can very easily see why this would be the case. Word, and many other Microsoft Office programs, are notorious for adding in lots of extra code to what should otherwise be very simple paragraph and table tags. In some cases, nothing happens. In many other cases, this code causes unintended consequences like bad spacing, wrong fonts, random bolding, etc. I'm all in favor of that change.

Of course my opinion doesn't help you one bit.

Have you tried installing JCE 2.3.4.4? https://www.joomlacontenteditor.net/dow ... /joomla-25

The other longer term fix is to correct your template so that what was originally being applied to that Msonormal class actually gets applied to plain paragraph containers. If I were in your shoes, this is the route I would follow. I can even help you track down the CSS to change if you'd like.
Ryan
Frontend Developer and Joomla Professional
Ethode Website Development: http://www.ethode.com
Personal Site: http://www.numinousmedia.com

davidascher
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 135
Joined: Tue Feb 28, 2006 3:23 pm

Re: paste from word - "Normal" paragraph problem

Post by davidascher » Wed Aug 20, 2014 1:37 am

Actually, I already installed that version (2.3.4.4) and it has the same problem. I have another site with version 2.3.2.1 and it does not have this problem. Unfortunately, I cannot find the package for J 2.3.2.1.


As for treating all unclassed paragraphs as if they are msonormal - that is is no go. There are legit unclassed paragraphs that should NOT be treated as if they are msonormal.

As for your reasons why you can understand why the JCE developers might have dropped the support for importing 'normal' paragraphs as msonormal, it seems to me that after they had spent a lot of energy trying to get this right over several releases, it makes no sense at all to just drop it - without mentioning the fact in the release notes.

I would be pretty surprised if this was not a mistake made by somebody new to their development team.

User avatar
numinousmedia
Joomla! Ace
Joomla! Ace
Posts: 1567
Joined: Fri Dec 16, 2011 6:13 pm
Location: Barberton, OH
Contact:

Re: paste from word - "Normal" paragraph problem

Post by numinousmedia » Wed Aug 20, 2014 1:42 am

They have always been really helpful to me in their forums. I'd suggest connecting with them there. They may not be aware of the issue, or could recommend a custom fix for your situation. You can find their forums here: https://www.joomlacontenteditor.net/support/forum

Another short term solution would be to add a Msonormal style to your JCE profile. Your clients could highlight the paragraphs that should have this class, they could select this style from a dropdown menu on the editor menu, and it would add that class back in. This is not ideal if your clients use this all the time, but if it's a once-every-great-while thing, it would work.
Ryan
Frontend Developer and Joomla Professional
Ethode Website Development: http://www.ethode.com
Personal Site: http://www.numinousmedia.com

davidascher
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 135
Joined: Tue Feb 28, 2006 3:23 pm

Re: paste from word - "Normal" paragraph problem

Post by davidascher » Thu Aug 21, 2014 11:26 pm

It seems that you can't post to their forums unless you pay.

People seem to have some difficulty understanding this issue and why it is so important. The content for site I'm working with is prepared by a dozen or more writers writing pieces that are much more than a paragraph or two blog entry. They know how to use Word. Everybody knows how to use Word. They are not going to spend time learning the ins and outs of the JCE editor to write their articles.

So the people who are the 'editors' of the site (and the owners and my clients) edit the Word docs they receive, then copy and paste into the JCE editor and content appears on the site. MOST paragraphs are "normal".

This system of adding content to the site has worked well for well over 6 years now. It shouldn't have to change because some new developer forgot to include the code (or decided to drop the code) for properly pasting from Word into JCE.

User avatar
numinousmedia
Joomla! Ace
Joomla! Ace
Posts: 1567
Joined: Fri Dec 16, 2011 6:13 pm
Location: Barberton, OH
Contact:

Re: paste from word - "Normal" paragraph problem

Post by numinousmedia » Fri Aug 22, 2014 1:54 am

I have 2.3.4.4 installed on an older Joomla site, and I was able to get it to keep the MsoNormal class when copying and pasting from Word.

I went into my editor profile (Default) --> Plugin Paramters --> Clipboard tab -->

I set Strip Class Attributes, Remove all SPANS, Remove all Styles to no, and left Microsoft Word Cleanup to "Only if Detected". Lastly, I added "MsoNormal" to the "Keep Tags" and "Styles to Keep" fields.
Ryan
Frontend Developer and Joomla Professional
Ethode Website Development: http://www.ethode.com
Personal Site: http://www.numinousmedia.com

User avatar
numinousmedia
Joomla! Ace
Joomla! Ace
Posts: 1567
Joined: Fri Dec 16, 2011 6:13 pm
Location: Barberton, OH
Contact:

Re: paste from word - "Normal" paragraph problem

Post by numinousmedia » Fri Aug 22, 2014 1:57 am

Also, in the JCE Global Configuration, I set my "Validate HTML" to no.
Ryan
Frontend Developer and Joomla Professional
Ethode Website Development: http://www.ethode.com
Personal Site: http://www.numinousmedia.com

davidascher
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 135
Joined: Tue Feb 28, 2006 3:23 pm

Re: paste from word - "Normal" paragraph problem

Post by davidascher » Fri Aug 22, 2014 11:57 pm

thank you. I don't know why I didn't see "Styles to keep" before. Adding MsoNormal to that fixes the problem. Shouldn't be necessary, but I can live with it.

thanks again for sharing your experience.

davidascher
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 135
Joined: Tue Feb 28, 2006 3:23 pm

Re: paste from word - "Normal" paragraph problem

Post by davidascher » Thu Apr 21, 2016 10:33 pm

JCE Editor v2.5.16 on Joomla! 3.5.1 - Drag & Drop content from a Word Doc will convert paragraphs with style "Normal" to p elements with class="MsoNormal". This is the behavior I need.

However, Copy & Paste the same content from the same Word doc and the "Normal" paragraphs become p elements with no class assigned.

I hope I am not asking for trouble here and the JCE folks "fix" the problem by making Drag & Drop work the same way as Copy & Paste. I need and want the Copy & Paste to work like Drag & Drop does - and like Copy & Paste USED to work back before JCE Editor v2.4.4.

Does anybody have any ideas/suggestions?


Locked

Return to “Administration Joomla! 3.x”