Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

No WYSIWYG editor but breaks in code? Bug? 
 
Paradise
Member
 
Total Posts:  33
Joined:  2007-09-21
Darmstadt
 

Hi,

i never use WYSIWYG editors and by default the one in Magento is turned off i think?
But if i but in my code in produkt-description:

<p>example</p>

<
p><b>example:</b><br />
example</p>

<
table width="400" border="0" cellspacing="0" cellpadding="0">
<
caption class="produkt"><b>Angebotsform:</b></caption>
  <
tr>
    <
td class="pack1"><img src="/files/images/icons/icon.gif" alt="icon" width="43" height="41" /></td>
    <
td class="pack2">example</td>
  </
tr>
</
table>

<
table width="400" border="0" cellspacing="0" cellpadding="0">
  <
caption class="produkt"><b>example:</b></caption>
  <
tr class="inhalts">
    <
td class="inhalts1">example</td>
    <
td class="inhalts2">example</td>
  </
tr>
</
table>

i have a lot of breaks between everything. Like:

<p>example</p>
<
br />
<
br />
<
p><b>example:</b><br />
example</p>
<
br />
<
br />
<
br />
<
table width="400" border="0" cellspacing="0" cellpadding="0">
<
caption class="produkt"><b>Angebotsform:</b></caption>
  <
tr>
    <
td class="pack1"><img src="/files/images/icons/icon.gif" alt="icon" width="43" height="41" /></td>
    <
td class="pack2">example</td>
  </
tr>
</
table>
<
br />
<
br />
<
br />
<
br />
<
br />
<
br />
<
br />
<
br />
<
br />
<
table width="400" border="0" cellspacing="0" cellpadding="0">
  <
caption class="produkt"><b>example:</b></caption>
  <
tr class="inhalts">
    <
td class="inhalts1">example</td>
    <
td class="inhalts2">example</td>
  </
tr>
</
table>
 
Magento Community Magento Community
Magento Community
Magento Community
 
winzippy
Sr. Member
 
Avatar
Total Posts:  101
Joined:  2008-02-08
Rochester, NY, USA
 

This may help: http://www.magentocommerce.com/wiki/wysiwyg/a_how-to

 
Magento Community Magento Community
Magento Community
Magento Community
 
Paradise
Member
 
Total Posts:  33
Joined:  2007-09-21
Darmstadt
 

I already read this. But its how to change or enable the editor. It don´t want a editor. But if the editor is off, where i get this breaks from?

 
Magento Community Magento Community
Magento Community
Magento Community
 
winzippy
Sr. Member
 
Avatar
Total Posts:  101
Joined:  2008-02-08
Rochester, NY, USA
 

Can you post a screen shot of what it looks like and what it should look like?

Also, you can try holding down [shift] when you hit enter if you’re typing your code directly into the textarea.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Paradise
Member
 
Total Posts:  33
Joined:  2007-09-21
Darmstadt
 

Screenshot shows nothing but a lot of space between the <p> tags or the <p> tags and tables.

In admin in the product description everything looks ok, but in frontend i have all this breaks in the source code on my side.

 
Magento Community Magento Community
Magento Community
Magento Community
 
winzippy
Sr. Member
 
Avatar
Total Posts:  101
Joined:  2008-02-08
Rochester, NY, USA
 

How are you inputing the HTML into the textarea? Copy and paste? Typing it in?

This is confounding me. Magento shouldn’t be doing that. It could be a bug. What version are you using?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Paradise
Member
 
Total Posts:  33
Joined:  2007-09-21
Darmstadt
 

Copy and paste from the windows editor.

But doesn´t matter how i but it in the description. Lets say no break in the description like:

</table><p>
instead of
</table>

<
p>
the <br/> is always there in frontend…
 
Magento Community Magento Community
Magento Community
Magento Community
 
jsimpson
Jr. Member
 
Total Posts:  3
Joined:  2008-04-15
 

The product description automatically converts newlines to <br/>.  It’s rather annoying and trying to figure out how to turn this off right now.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jsimpson
Jr. Member
 
Total Posts:  3
Joined:  2008-04-15
 

app/design/frontend/default/default/template/catalog/product/view.phtml

<div class="product-specs"><?php echo nl2br($_product->getDescription()) ?></div>

to

<div class="product-specs"><?php echo $_product->getDescription() ?></div>
 
Magento Community Magento Community
Magento Community
Magento Community
 
traviswu
Member
 
Total Posts:  31
Joined:  2008-05-29
 

Nice. this is exactly what I am looking for . Thank you jsimpson.

 
Magento Community Magento Community
Magento Community
Magento Community
 
choussamaster
Sr. Member
 
Total Posts:  93
Joined:  2009-07-14
 

to delete automatic <br/> after <p> in magento 1.4
app\design\frontend\default\default\template\catalog\product\view
<?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), nl2br($_description), 'description') ?>
to
<?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), $_description, 'description') ?>

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top