1
Moonrakre
Tables in the News Module
  • 2010/2/4 17:00

  • Moonrakre

  • Just popping in

  • Posts: 30

  • Since: 2005/12/6


FCKeditor allows us to create tables in Content, Smart Section, News and others. It also allows pasting from MSWord including tables. In Content and Smart Section there is an option to disable or enable Line Break Conversion. This stops there being a big blank space before the table. It is not available in News v1.55.

Does anyone know how to stop News generating a whole load of line breaks before a table?

Why does this happen anyway?

I have a client who gets copy in MSWord and just loads it into the website and drops me an email to sort it out - only I can't - help please.

Adrian

2
culex
Re: Tables in the News Module
  • 2010/2/4 17:31

  • culex

  • Module Developer

  • Posts: 711

  • Since: 2004/9/23


If you press the <html> you'll see the document source code.

Before <table> delete the <br>, <br /> and you'll have the page without the pre-table line breaks

3
Moonrakre
Re: Tables in the News Module
  • 2010/2/4 20:37

  • Moonrakre

  • Just popping in

  • Posts: 30

  • Since: 2005/12/6


There are no <br>s at all, neither in the source at FCKeditor nor in the record in the database.

However if you look at page source once displayed there are two <br />s before the table, but I can't edit those out, and the gap is many line spaces line spaces.

In the database there are no <br />s inside the table, however when the source is displayed from browsing the news item the table then has 121 occurrances of <br />. These linebreaks are clearly being added by the module at display time. If I save the source code off and remove these linebreaks then all is OK.

Note that both Content and Smartsection have a tick box to turn off line break conversion. On the form I am using now there is a tick box "Enable line break (Suggest to turn off if HTML enabled)". What I want to know is how to this off in News, please.


4
Burning
Re: Tables in the News Module
  • 2010/2/4 21:10

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


hi'

That's a matter that an experimented user can resolve :
• open Pspad editor
• paste your html source in this editor
• use compress html code function
• copy / paste this compressed code in source window
• send your form without preview

... but for an end user, you should take a look to FCKeditor forums (there is a lot of topic about this matter)

If I can remember (in fact, I'm reading some notes), you have to modify fckeditor/fckconfigs.js file, line 83.
//FCKconfig.FormatOutPut = true ;
FCKconfig.FormatOutPut false ;


... I'm not sure at all that will resolve <br /> matter or that not produce other trouble. Just test it (be careful : you have to erase /cache folder content each time).

I have put a 2.6.3. / personal version here (with 3 videos plugins / buttons).
http://www.babylonbyxoops.net/modules/simplecontent/article.php?article_id=68

Perhaps this version would work better than yours ?

(sorry for bad english)

5
Moonrakre
Re: Tables in the News Module
  • 2010/2/5 9:55

  • Moonrakre

  • Just popping in

  • Posts: 30

  • Since: 2005/12/6


Many Thanks Burning, I now have a solution.

Unfortunately the change to FCKconfig.js didn't solve the problem but the information you gave me has helped me get to a solution, albeit imperfect.

The difference between Content, Smartsection and News is that the former two use the function displayTarea (in module.textsanitizer.php) with all the parameters, including the last which controls the conversion of line breaks to <br />. News only uses the first four parameters. So I have added ",1,0" to three instances of this in class.newsstory.php. The ones referring to hometext and bodytext.

This is a bit of a sledgehammer approach but since my users only use FCKeditor it will be fine.

What I would now like is a version of News which asks the question "Enable Line Break Conversion" for each story, saves that in the database and uses the information in class.newsstory.php. This is not the case with News 1.64 but hopefully it will come along at sometime.

Login

Who's Online

142 user(s) are online (106 user(s) are browsing Support Forums)


Members: 0


Guests: 142


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits