textarea newline on Enter key, Editor-1.7.4

textarea newline on Enter key, Editor-1.7.4

hzhonghzhong Posts: 19Questions: 5Answers: 0

Hello,

In the field type of textarea, Is there a way to get newline through hitting Enter key under Editor-1.7.4 without updating to 1.8?

Thanks

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 56,819Questions: 1Answers: 9,029 Site admin
    Answer ✓

    1.8 (and 1.9.4 which is the latest in the 1.x series) are bow backwards compatible with 1.7. I'd suggest upgrading if you can.

    With a textarea input, you should be able to just press enter and get a new line character.

    Allan

  • hzhonghzhong Posts: 19Questions: 5Answers: 0

    Thank you Allan. I managed to get newline in textarea after upgrading.

    Here are two follow up questions:
    1. How can I reset the rows attribute of the textarea. The default set seems to be 4, only 4 rows are shown and user has to scroll to see other rows.
    2. What is the animated icon on the right side of the editor form? Can I hide it?

    Thank you.

  • allanallan Posts: 56,819Questions: 1Answers: 9,029 Site admin
    Answer ✓
    1. How can I reset the rows attribute of the textarea. The default set seems to be 4, only 4 rows are shown and user has to scroll to see other rows.

    A little CSS will do it rather than the attributes:

    div.DTE_Field_Type_text textarea {
      height: 10em;
    }
    
    1. What is the animated icon on the right side of the editor form? Can I hide it?

    That most likely means you are using dependent() and not calling the callback function, or returning an object from the function. I'd need to be able to see the code to say for sure.

    Allan

  • hzhonghzhong Posts: 19Questions: 5Answers: 0
    edited December 2021

    Thank you Allan.
    Yes, that was caused by not returning a value from the function in dependent, and was resolved by returning just {}.

    And FYI, the icon didn't show before. It shows only after the updating from 1.7.4 to 1.8.1.
    Thanks!

Sign In or Register to comment.