XPages RichText链接 [英] XPages RichText Links

查看:79
本文介绍了XPages RichText链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个XPage以显示文档数据.为了显示RichText数据,我添加了RichText控件.我发现数据库/视图/文档链接以适当的图标显示,但转换为http-链接.我希望将这些链接转换为notes://-links,以确保在用户的Notes客户端而不是用户的浏览器中打开这些链接. 从技术角度如何实现这一目标有什么建议吗?

I have an XPage to display document data. To display RichText data I added a RichText control. What I found out is that database / view / document links are displayed with the appropriate icon but are converted to http-links. I would like to have these links being transformed to notes://-links to make sure that these links are being opened in the user's notes client rather than in the user's browser. Any suggestions how to accomplish this from a technical point of view?

在此先感谢您的帮助. 迈克尔

Many thanks in advance for your help. Michael

推荐答案

跟我说话:

 The web knows no RichText, it is a ghost of Christmas past.
 There is only MIME. Now go and live with it!

除非您构建在客户端和浏览器中使用RichText的混合应用程序,否则我建议在RichText选项中选择选项[x]另存为MIME.对于混合应用程序,这取决于用例.

Unless you build an hybrid application where RichText is used in the client and browser I recommend to select the option [x] Save as MIME in the RichText options. For hybrid applications it depends on the use case.

在您的情况下,似乎(?)使用客户端添加了datbase/view/document链接.在这种情况下使用mime似乎是个好主意.然后,这只是一个简单的字符串(HTML字符串),您可以在其中显示(或保存)之前使用DOM操作或正则表达式来整理内容.在客户端或服务器端都可以使用

In your case it seems (?) that the datbase/view/document links are added using a client. It looks like a good idea to use mime in this case. Then is is just a simple string (of HTML) where you can before display (or save) use a DOM operation or a Regex to sort out the content. That works client or server side

您可能有一个自定义控件,其中包含DIV和XSP.addOnLoad()脚本,该脚本使用来获取所有链接的句柄,然后整理出要更改的链接.

You could have a custom control that contains a DIV and a XSP.addOnLoad() script that uses the RichtText url in an Ajax call and a dojo.query("a") to get a handle on all links and then sort out the ones you want to alter.

让我们知道它的进展.

这篇关于XPages RichText链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆