将文本粘贴到richtextbox中 [英] Paste text into richtextbox

查看:75
本文介绍了将文本粘贴到richtextbox中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

可以将纯文本从word粘贴到richtextbox并将其作为格式化文本保存到我的数据库字段中吗?

Hello,
Is possible to paste plain text from word into richtextbox and save it into my database field as formatted text ?

推荐答案

您可以将文本粘贴到RichTextBox中,但不会自动格式化 - 请参阅OriginalGriff的评论。



应用格式后,您可以保存文本使用RichTextBox格式化数据库。 Rtf 属性

参考信息 [ ^ ]





您可以找到格式化richtextbox文本的示例在dotnetcurry [ ^ ]例如。



或者你可以在剪切和粘贴之前在Word中进行格式化



富文本框将为你转换为rtf

[ /编辑]
You can paste text into the RichTextBox but it will not be formatted "automatically" - see comment from OriginalGriff.

Once you have applied the formatting you can save the text with formatting to the database by using the RichTextBox.Rtf property
reference information[^]


You can find examples of formatting the richtextbox text at dotnetcurry[^] for example.

Or you could do the formatting in Word before you cut&paste

The rich text box will do the conversion to rtf for you
[/Edit]


您好b $ b

我已阅读以下链接中的数据,其中包含一些有用的信息:



insert-image -at-cursor-in-richtext-box [ ^ ]



将文本插入richtextbox中的特定位置 [ ^ ]



最佳问候
Hi
I have read the data in the following links and there is some useful information in it:

insert-image-at-cursor-in-richtext-box[^]

insert text into a specific position in richtextbox[^]

best regards


这篇关于将文本粘贴到richtextbox中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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