jQuery UI Widgets Forums Editors Editor Stop default Linebreaks being added to blank text

This topic contains 2 replies, has 2 voices, and was last updated by  cghill 4 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

  • cghill
    Participant

    Hi,

    I have a textarea in a form which can have no content – when this is displayed Editor seems to default in the linebreak which moves the text displayed and creates a blank line. When no lineBreak is defined (ie defaults to div) this seems to be worse as it wraps each subsequent display in another div so when I save multiple times I just have a field full of <div><div>…..</div></div>

    HTML

                        <tr>
                            <td class="prod_label">Short Desc</td>
                            <td class="prod_check"></td>
                            <td class="prod_data"><textarea cols="80" rows="5" id="detailsShortDescription" name="detailsShortDescription" ><?php echo $product->getShortDescription(); ?></textarea></td>
                        </tr>

    Editor Settings/Invocation

                $('#detailsShortDescription').jqxEditor({ tools: 'bold italic underline | ul | html ',lineBreak:'br' });
    

    Hristo
    Participant

    Hello cghill,

    With property lineBreak could set different options of ‘linebreak’.
    Could find more in our API Documentation.
    Did you have any error messages in the console?
    Also I would like to suggest you to update your version to latest.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    cghill
    Participant

    Thanks Hristo for the response – with any linebreak other than BR, it just keeps adding layers of linebreaks (as I described in the post) – with BR it only ever adds the first one if the field is blank – this is acceptable for now.

    I have the latest version and will continue to monitor – we get no error messages in the console and everything else appears to be working correctly 🙂

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.