Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有 setValue 的基本 ExtJs 文本区域。该值作为来自数据库的字符串传入 ExtJs。
该字符串是在 php.ini 中创建的。由于它不支持 HTML,<br>因此无法使用。
<br>
它似乎也忽略了\r\n or \nor \ \r\ \nor \ \n- 它只会将其打印为文本。
\r\n
\n
\ \r\ \n
\ \n
有什么解决方法吗?
当存储中的数据类型是字符串时,似乎 ext 以某种方式逃脱了所有内容(我猜想设置了一些 ASCII 值)。
将字符串直接添加到 setValue() 与 \n 一起使用。
作为一种解决方法,我使用了自定义占位符 %nl 并使用 js 替换将它们更改为 \non setValue()。