Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
Hi

I am in the process of exploring couchcms. However I have faced an challenge.

I have assigned a css to my html page. However whenever we try entering some text in the rich text editor it does not pick up the height: auto tag. In the normal html page the height of the page gets extended according to the amount of content we add in the body text area. However this is not happening after conversion to couch and the text content is getting cut off after a specific point.

What may be the cause of the problem.
Hi alokk2700,

I think the markup that you have made editable also contains styles (e.g. classes). When the user edits the text, these styles could inadvertently get lost which would explain what you see happening. To illustrate what I mean, consider the following
Code: Select all
<cms:editable name='test' type='richtext'>
   <div class="fullscreen" id="mydiv">
      blah blah
      ...
   </div>
</cms:editable>

In the snippet above the surrounding DIV is also made editable. When the user edits the text it is very easy to delete the original div and place some new content. Of course that would result in the page breaking.

The ideal way is to make only the inner text editable e.g.
Code: Select all
<div class="fullscreen" id="mydiv">
    <cms:editable name='test' type='richtext'>
       
        blah blah
        ...
    </cms:editable>
</div>

Please check if what I mentioned is indeed the case.

Thanks.
Sorry posted the wrong title, actually the problem is with the height: auto thing not working. The content is getting expanded.
@alokk2700, the way Couch works, it does not change a byte of your original code except what gets injected into the page as editable regions' contents.

You can easily find as to what is going wrong - just compare your original HTML with the generated HTML (view:source) and see what has changed. I'm sure you'll certainly spot what could be causing the problem you mentioned.

Hope this helps.
Yes found the answer there was some issue with our css. :)
5 posts Page 1 of 1