[英]Get last word position (x,y) coordinates in textarea
I want to wrap the email addresses inside textarea to the next row rather than breaking.我想将 textarea 内的电子邮件地址包装到下一行而不是中断。 I have try somehow to find the last word that reaches the border, but I couldn't find any solution My question is : Is there any event where I can get the position of the last word reaching the border of the textarea so i can get the last word and move it to the next line?
我试图以某种方式找到到达边界的最后一个单词,但找不到任何解决方案我的问题是:是否有任何事件可以让我获得到达 textarea 边界的最后一个单词的位置,以便我可以得到最后一个单词并将其移动到下一行?
In the following img you can see the current behavior在下面的 img 你可以看到当前的行为
If i could understand your question.如果我能理解你的问题。 You can add
<br>
tag before last email it will bring down the last email to next row.您可以在最后一封电子邮件之前添加
<br>
标签,它将把最后一封电子邮件带到下一行。 if you want emails in first row to reach border of text area use <div class="textarea" align="justify"
it will stretch it to the border of the text area.如果您希望第一行中的电子邮件到达文本区域的边界,请使用
<div class="textarea" align="justify"
它将其拉伸到文本区域的边界。 Please elaborate if i misunderstood your question.如果我误解了你的问题,请详细说明。
Edit: in textarea
there's isn't much you can do cause its mostly used for comments section.编辑:在
textarea
,您无能为力,因为它主要用于评论部分。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.