Page 1 of 1

Discription Text Box problems

PostPosted: 14 May 2014, 13:42
by willie
When adding or editing a property, text can be typed into the description text box including carriage return for a new line. When saved and viewed, the text displays without any line spaces and is just a single block of text. Also being able to copy / paste from MS Word would be very helpful.

see link below
http://re-free.monoray.net/property/29

Any help appreciated.

Thanks
Willie

Re: Discription Text Box problems

PostPosted: 15 May 2014, 23:21
by willie
just realised the contents of the link above would be reset.

I have created a new link where the problem shows better.
http://www.somervilleandrussell.ipan360.net/realestate/apartments/backend/main/view?id=29

So adding text to the descriptions box has no text formatting capabilities. Is it possible to allow carriage returns for a new text line or even better, to add formatting to the text box?

Thanks for any suggestions,

Willie

Re: Discription Text Box problems

PostPosted: 16 May 2014, 09:10
by fisher
You can insert the editor using this way:
Code: Select all
<?php
$this
->widget('application.modules.lang.components.langFieldWidget', array(
        
'model' => $model,
        
'field' => 'название_поля_в_таблице',
        
'type' => 'text-editor'
    
));
?>

Let's take a look for example at the "Description" field and the process of creating/editing a listing. We had the following code In the file protected\modules\apartments\views\backend\__form_general.php:
Code: Select all
<?php
$this
->widget('application.modules.lang.components.langFieldWidget', array(
        
'model' => $model,
        
'field' => 'description',
        
'type' => 'text'
    
));
?>

and it should be WYSIWYG editor:
Code: Select all
<?php
$this
->widget('application.modules.lang.components.langFieldWidget', array(
        
'model' => $model,
        
'field' => 'description',
        
'type' => 'text-editor'
    
));
?>

Remove the CHtml::encode in the file protected\modules\apartments\views\_tab_general.php for description field during the output

Re: Discription Text Box problems

PostPosted: 22 May 2014, 20:33
by willie
Thank you for your help.

Your code edit worked a charm. :-)

Regards,
Willie

Re: Discription Text Box problems

PostPosted: 11 Aug 2014, 15:40
by palva12
Hi,

Similar to above I would like to include "WYSIWYG editor" while "Adding the review" ( body of add review) .
This way review text can be formatted. Please help to make this change

Regards
Raj

Re: Discription Text Box problems

PostPosted: 12 Aug 2014, 09:31
by fisher
such changes will affect a couple of files and will take time, so contact us via contact form, we will evaluate the cost and implement such changes.