此textarea是一个经过多次更新的文本区域,textarea中的每一行都用于一个单独的条目。因此,最好从文本框的最左边开始。
例如我想要的是,
铁线莲,反青蒿素,反杜洛丹蒂,龙舌兰,苦艾,准建筑,贝塔,外植体
但它展示的是,
_____(空格)_________________Sed ut perspiciatis,unde omnis veritatis _________________Sed voluptatem宾格宾格,_________________Sed_________________Sed aperiam ipsa,quae ab inventore veritatis et拟architecto dicta sunt,explicabo。
即使当我输入文本区域来保存时,也会发生这种情况,我会一直往左打。我如何绕过它,使它只显示在最左边的每一行?
这是我的密码:
<div class="col my-2 w-1/6">
<p class="md:text-center">Notes</p>
<textarea id="loc_notes" cols="30" rows="10" style = "font-size: 12px;width:100%" class="mx-1 border-2 border-black" name="location_notes">
@foreach($notes as $note)
{{$note->my_notes}}
@endforeach
</textarea>
</div>发布于 2021-07-27 13:18:20
这个问题对我来说有点不清楚,但我认为你想从中得到:
first entry second entry对此:
first entry
second entry你在$notes中循环的方式--它不知道你想在每个音符之后返回一个回车--让它们在左边排队。
要获得回车返回,在注释的每个回显之后添加 ,如下所示:
@foreach($notes as $note)
{{ $note->my_notes }}
@endforeach有关文本区域中新行/回车的更多详细信息,请参见here。
编辑
你的问题现在更清楚了。由于刀片文件中的格式,您将获得空白。改变这一点:
<textarea>
@foreach($notes as $note)
{{$note->my_notes}}
@endforeach
</textarea>(去掉所有空格):
<textarea>@foreach($notes as $note){{ $note->my_notes }}@endforeach</textarea>https://stackoverflow.com/questions/68545467
复制相似问题