How to remove extra space inside textarea

Its because your php tag is on a newline. It is reading in the whitespace from where <textarea> ends until php tag opens. Put this all on one line to fix.

---------

Trong quá trình code HTML, có thể mọi người sẽ gặp lỗi khi dùng thẻ <textarea>, đó là lỗi có khoảng trắng các ký tự dấu cách ở trước nội dung chính. Cách khắc phục là viết tất cả nội dung của thẻ <textarea> trên một dòng.

Sửa từ code trên nhiều dòng

<textarea class="form-control" name="block-content" rows="3">
    {{$data->value ?? ""}}
</textarea>

thành code trên một dòng

<textarea class="form-control" name="block-content" rows="3">{{$data->value ?? ""}}</textarea>

Bình luận
Zalo