RadRichTextBox WPF中的ContextMenu超链接 [英] ContextMenu Hyperlink in RadRichTextBox WPF

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

问题描述

当我在RadRichTextBox的ContextMenu中的超链接中添加物理路径时,我看到http://被添加了额外的内容,但仅在一种情况下。

When i add a Physical path in a Hyperlink from ContextMenu of RadRichTextBox i see http:// getting added extra but in only in one scenario.


  1. 我尝试添加以下链接(文件夹名称最后没有空格)

以上内容为我提供了正确的网址。

the above gives me correct URL.


  1. 当我添加带有最后一个空格的文件夹的链接时,

当我编辑超链接并看到

// XAML

     <telerik:RadRichTextBox x:Name="ss" Grid.Column="0" Grid.Row="1" telerik:StyleManager.Theme="Windows8" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" FontWeight="Normal" AcceptsTab="True" telerik:HtmlDataProvider.Source="{Binding Notes, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsSpellCheckingEnabled="True"  HyperlinkClicked="ritFnBNotes_HyperlinkClicked"   DocumentInheritsDefaultStyleSettings="True" Height="150" CommandExecuting="ritNotes_CommandExecuting" IsReadOnly="{Binding EnableForEdit, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource InverseBool}}" DocumentContentChanged="Notes_DocumentContentChanged">
     <telerik:RadRichTextBox.SelectionMiniToolBar >                                                     <telerik:SelectionMiniToolBar telerik:StyleManager.Theme="Windows8" />
     </telerik:RadRichTextBox.SelectionMiniToolBar>                                                <telerik:RadRichTextBox.Document>
         <telerik:RadDocument>
      <telerik:Section>
      <telerik:Paragraph FontSize="8" LineSpacing="0" LineSpacingType="Exact"></telerik:Paragraph>
     </telerik:Section>
      </telerik:RadDocument>    
 </telerik:RadRichTextBox.Document>
     <i:Interaction.Triggers>
     <i:EventTrigger EventName="DocumentContentChanged">
     <i:InvokeCommandAction Command="{Binding FnBNoteChangeCommand, Mode=OneWay}"/>
      </i:EventTrigger>
     </i:Interaction.Triggers>
     </telerik:RadRichTextBox>

我不确定 http:// 附加到我上传物理路径的URL中。现在我需要摆脱 http://

I'm not sure how does the http:// append into the URL where i upload a physical path. Now i need to get rid of the http://.

有人帮我解决这个问题。

Someone help me with this.

推荐答案

恐怕这是 RadInsertHyperlinkDialog 的已知问题。如果网址与正则表达式不匹配,则会在字符串中添加 http://。

I am afraid this is a known issue with RadInsertHyperlinkDialog. When the URL doesn't match a regular expression, an "http://" is added to the string.

根据Telerik官方支持的建议,您可以创建一个自定义对话框来解决此问题。请参考以下链接以获取更多信息: http://www.telerik。 com / forums / radrichtextbox-hyperlink-dialog-issue

As suggested by the official Telerik support, you could create a custom dialog to work around this behaviour. Please refer to the following link for more information: http://www.telerik.com/forums/radrichtextbox-hyperlink-dialog-issue

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

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