Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
I have one problem. In my HTML code I created Paragraph and I have some CSS for him. In that paragraph I put editable region with richtext.

Code: Select all
<p class="readbox-detail-poc">
<cms:editable name="box3_text" group="offer_group" label="Text" type="richtext" />
</p>


Unfortunately, when I add text in Couch Admin to this region, Couch creates completely new paragraph and my paragraph with css class stays empty. Here is how that looks like:

Image

What should I do that text stays in Paragraph that I created?
Hi,

This 'problem' has been discussed before. Please see -
viewtopic.php?f=4&t=6345&p=8050
viewtopic.php?f=2&t=7751

I'd like to add that CKEditor (like all richtext editors) will add its own markup that might not always suit you if the text being inputted is mostly plain text.
If that is the case, as an alternative, you can use type 'textarea' instead.
<cms:editable name="box3_text" group="offer_group" label="Text" type="textarea" />

On the frontend, wrap the output with cms:nl2br to convert the newlines to <br/> as follows
Code: Select all
<cms:nl2br><cms:show box3_text /></cms:nl2br>

Hope it helps.
Nice! Thanks KK!
3 posts Page 1 of 1
cron