javascript - Firestore 不会在 jspdf 字符串上读取 \n
问题描述
我正在尝试在 jspdf 字符串上换行。问题是firestore不会将它( \n )识别为换行符,而是作为字符串。
我尝试过的解决方案:
\n\n , html br 标签
var string = "This is a sample lb\n text"
var string1 = string.replace("lb","\n")
doc.text(10,10, string1)
actual : This is a sample lb\n text
expected : This is a sample
text
解决方案
推荐阅读
- java - 动态对象创建和函数调用
- opencv - 如何提取此图像中的纸张轮廓(opencv)?
- javascript - 使用 Ajax 验证返回的 Flask WTForms 不会在表单本身中显示错误,而是在新网页中打开结果
- applescript - 使用applescript获取倒数第二个窗口索引
- facebook - Graph API 通过单独的 ATS 发布作业和检索应用程序
- python - 在我的 python 多人游戏中获取 [WinError 10057](使用 pygame)
- android - 为什么 Android 使用 FirebaseMessagingService 而不是 BrodcastReciver
- django - 使用 Django ManyToManyField 时出现错误
- python - 函数调用后表单验证不清除
- android - 颤动模糊效果在 iOS 上不起作用(ImageFilter.blur)