Google表单 + Apps脚本:设置帮助文本和对齐 –> 两端对齐

huangapple go评论62阅读模式
英文:

Google Form + Apps Script: setting HelpText and alignment --> justify

问题

我使用Google Sheets和App Scripts创建了一个Google表单。

在使用setHelpText为部分标题项目设置长字符串时,我在寻找一种合理的方式。

我想要将这段文本对齐:Lorem ipsum dolor sit amet, consectetur adipisci elit, sed do eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrum exercitationem ullamco laboriosam, nisi ut aliquid ex ea commodi consequatur. Duis aute irure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum。

目标是在表单中可视化对齐文本。

我尝试使用Chrome DevTools修改HTML页面,但这种方式更改是临时的。

我还没有使用App Scripts创建HTML文件...是否可以使用RichTextApps之类的东西来对齐文本?在浏览了所有地方后,我没有找到与帮助文本相关的信息。

英文:

I created a Google form starting from Google Sheets and App Scripts.

I' am struggling to find a way to justify long strings when using a setHelpText for a Section Header Item:

var  sectionL = form.addSectionHeaderItem()

sectionL.setTitle('«Lorem ipsum dolor sit amet, consectetur adipisci elit, sed do eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrum exercitationem ullamco laboriosam, nisi ut aliquid ex ea commodi consequatur. Duis aute irure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.»');

I want to justify this text --> «Lorem ipsum dolor sit amet, consectetur adipisci elit, sed do eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrum exercitationem ullamco laboriosam, nisi ut aliquid ex ea commodi consequatur. Duis aute irure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.»

The aim is to visualize a justified text in the form.

I tried to use the Chrome DevTools to modify the html page but in this way the change is temporary:

element.style {
    text-align: justify;
}
setHelpText

I'm not already created a html file by using App Scripts... is it possible to justify texts using something as RichTextApps? Browsing everywhere I did not found nothing related to the help text.

答案1

得分: 0

一种获得文本间距和可能的对齐方式是使用固定大小的字体,如Lucida Console。这可能会很繁琐,但可以使文本行对齐。

英文:

One way to get text spacing and possibly alignment would be to use a fixed-size font like Lucida Console. It would be tedious, but it is a way to get rows of text to line up.

huangapple
  • 本文由 发表于 2023年4月16日 23:41:11
  • 转载请务必保留本文链接:https://go.coder-hub.com/76028723.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定