编辑 RTF 并保留标签?

发布于 2024-07-13 00:13:59 字数 148 浏览 5 评论 0原文

我有一个用 RTF 编写的模板(其中一些标签被应用程序中数据库中的数据替换),但是当我在 MS Word 中编辑它们时,Word 在模板中添加了一些不可见的标签,这会破坏我的标签(我必须在记事本并编辑代码)。

您知道一些严格遵循 RTF 规范的 RTF 编辑器吗?

I have a templates written in RTF (with some tags which are replaced by data from DB in app), but when I edit them in MS Word, Word put some invisible tags to the templates, which destruct my tags (I must open template in Notepad and edit code).

Do you know some editor for RTF, which strict follows RTF specification?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

向日葵 2024-07-20 00:13:59

在 Windows 上,我认为附带的应用程序写字板相当不错。

On Windows, the included app Wordpad is pretty decent in my opinion.

筑梦 2024-07-20 00:13:59

好吧,我知道谷歌会找到一堆编辑器,但我没有时间尝试每一个编辑器来找出最好的一个。

所以我寻找好的建议,而不是可用的建议

编辑:我发现并使用此解决方案数周

TE编辑

并且非常好,我推荐它。

OK, I know that google find bunch of editors, but I don`t have time to try each of them to find out best one.

so I search for advice which is good, not which is avialable

EDIT: I found and for weeks use this solution

TE EDIT

and is very good, I recommend it.

帝王念 2024-07-20 00:13:59

RTF 规范允许 RTF 编辑器(例如 Word 或第三方控件)将标签撒在 RTF 文本之间,前提是保持实际的 RTF 显示。 因此,无法保证您的原始模板文本不会受到干扰。 因此,我建议使用 RTF 编辑器 API 在模板中进行任何搜索/替换。 RTF 编辑器知道将 RTF 标签放在一边并按预期访问原始文本。

The RTF spec allows an RTF editor such as Word or a third party control to sprinkle the tags in-between the RTF text, provided that the actually RTF display is maintained. For this reason, there is no way to guarantee that your original template text will not be disturbed. For this reason, I recommend using an RTF editor API to do any search/replacement within your template. The RTF editor knows to put aside the RTF tags and access the original text as intended.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文