Tuesday, May 22nd

Last update05:36:30 AM GMT

Font Size

Screen

Profile

Layout

Menu Style

Cpanel
Welcome, Guest
Username Password: Remember me

Paste from Notepad stripping carriage returns
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Paste from Notepad stripping carriage returns

Paste from Notepad stripping carriage returns 11 months, 1 week ago #4379

  • robertf
  • OFFLINE
  • Senior Boarder
  • Posts: 50
  • Karma: 3
Hi,
This morning I tried a 5 minute update, adding an article to a 1.5 website, copying and pasting the content from an email. As usual, I 1st pasted the text into Notepad, then copied and pasted it into the Joomla article. When I clicked Save, all the carriage returns (line spacing/paragraph breaks) were stripped.

Thereafter, if I tried entering the text directly into the article, the same happened. In the end I had to copy and paste from a published article and "insert" chunks of text into it (and delete the unwanted text) to maintain the formatting. The whole palaver turned into a much longer job!

Since then, I've done some testing with different browsers, editors and templates, all of which resulted in the same formatting problem (though 1.6 articles appear not to be affected).

I then noticed that the Format drop down option in the JCE tools was set to Div. I changed this to Paragraph and voila, the problem was fixed.

This is all well and good, but I've not come across this before and I wondered if anyone else has. Also, while I spent several hours nutting this out, I wouldn't want Joe or Jane User having to do the same. If this has happened to you before, is there a way to stop it happening in future.

TIA,
Robert
Last Edit: 11 months, 1 week ago by robertf.

Re: Paste from Notepad stripping carriage returns 11 months, 1 week ago #4392

  • Partic
  • OFFLINE
  • Moderator
  • Posts: 341
  • Karma: 21
Robert,

You can set in JCE whether container elements use P or DIV, or whether the feature is disabled. You can also specify whether a newline triggers a BR or P.

Components > JCE > Configuration
Formatting Section of the configuration
Change options and save settings.

Another of the options there to note is the editor content class. If your template has a dark or patterned background, but your content areas are on a white background, you'll find that switching on High Contrast will then fix the issue where the editor has the site's background colour instead of the white background. Makes editing on a dark template so much easier!

Another feature of JCE is that there is a Paste as Plain Text and Paste From Word option - they're in a drop down on the Paste button on the toolbar. These options allow you to strip out other formatting from the info you're pasting. take a look at this to perhaps speed up your cut and paste from emails.

Unfortunately, I couldn't replicate the issue you were having tonight, but have seen a vast range of pasting issues over time - primarily with the Word XML going into an article when cut and pasted from Word or Outlook without being cleaned up.

Patrick
Patrick Jackson
www.kpsystems.com.au
Ask Anything Joomla and I'll helpfully tell you where to go

Re: Paste from Notepad stripping carriage returns 11 months, 1 week ago #4398

  • robertf
  • OFFLINE
  • Senior Boarder
  • Posts: 50
  • Karma: 3
Hi Patrick,

Thanks for your response. Before posting my query, I did try the Paste from Word/as Plain Text options in JCE and I tweaked the P / DIV and BR / P settings (though I hadn't changed them from when copy and paste worked to when it stopped working). However, I had no success with these.

The only thing I can think of that has changed recently, is upgrading my work desktop from an XP box to Win 7. I wondered if the problem I'm having has something to do with the Win 7 version of Notepad. Unfortunately I don't have the XP box any more to test my theory (it blew up)!

Regards,
Robert
  • Page:
  • 1
Time to create page: 0.40 seconds
You are here: Forum