richtext

Can't delete image in contenteditable div on Android

。_饼干妹妹 提交于 2019-12-04 11:04:21
问题 I am building a rich text editor in android. To do so, I am using a webView with a contentEditable div. To add styles, I invoke JavaScript . This all works fine, except when I invoke JavaScript to insert either an image or a horizontal rule. When I use JavaScript to insert these things, if I then try to press the back button to delete either the image or the horizontal rule, it doesn't work. Oddly enough, if I first enter any other character, and then insert the image or horizontal rule, I

bold (or other formatting) in iOS push notification

自闭症网瘾萝莉.ら 提交于 2019-12-04 10:08:15
The built-in Messages app makes message-senders' names in push notifications bold . Is it possible to do this for my app? What would such a payload look like? If it's relevant, I'm testing using the Mac app APN Tester to send a push to my iPhone, with this type of payload {"aps": {"alert": "hey bob", "badge": 2}} . (I tried asterisks *text* and HTML tags <b>text</b> but they don't do anything. I can't seem to find documentation on it, either.) There is no rich text functionality in iOS Push Notifications. An alternative for iOS 8.2 plus may be to use the 'title' to display the sender's name,

How to add image in Quill JS?

僤鯓⒐⒋嵵緔 提交于 2019-12-03 11:47:02
问题 I can't figure out how to get images to work like in the example on http://quilljs.com/. I tried adding <span title="Image" class="ql-format-button ql-image"></span> to the toolbar, which adds the button, but clicking on the button does nothing and I can't find anything in the documentation. Any suggestion? 回答1: Updated Answer As of version 1.0 and beyond you no longer need to add the tool-tip module it's included by default. An example of how to enable it would be this. <script> var

workaround for contenteditable on iPad

北战南征 提交于 2019-12-03 08:53:49
I have a web application that uses TinyMce to allow rich text editing. Some of my customers are desperate to get it to work on iPad (which doesn't support contenteditable and therefore TinyMce doesn't work) At the moment the only choices I have are: Disallow rich text editing when i detect the browser is iPad. This is not much of a solution because my app relies heavily on rich text editing Wait for iPad to support contentEditable Write my own iPad app. This isn't really workable because it's a big complex app with loads of HTML and javascript and I would have to rewrite it all Use another

Can't delete image in contenteditable div on Android

喜你入骨 提交于 2019-12-03 06:20:42
I am building a rich text editor in android. To do so, I am using a webView with a contentEditable div. To add styles, I invoke JavaScript . This all works fine, except when I invoke JavaScript to insert either an image or a horizontal rule. When I use JavaScript to insert these things, if I then try to press the back button to delete either the image or the horizontal rule, it doesn't work. Oddly enough, if I first enter any other character, and then insert the image or horizontal rule, I can delete the image/horizontal rule just fine, but cannot delete the character I entered immediately

Use my existing Rich Text UI with CKEditor APIs

隐身守侯 提交于 2019-12-01 10:34:31
I have an existing Rich Text UI that I'd like to use with CKEditor. Basically, I want CKEditor to handle the complicated parts of applying styles, formats, filtering, and normalizing inserted content. My existing UI needs to drive the interaction and show state based on selection (ie. selecting bold text should be reflected in the state of my 'Bold' button in the UI. I have got the integration to a point where I can apply bold, italic, and underline formats, change font size, and add styles. For bold, italic, and underline: var editor = this.getEditor(); editor.execCommand('underline'); //

Sitecore: Forcing pasting as unformatted text

邮差的信 提交于 2019-12-01 00:36:55
Is there a good way to force pasting as text inside Rich Text Fields inside Sitecore? I know there's a "Paste as Text" button in the Rich Text Editor itself, but content authors are almost definitely going to just hit Ctrl+V or Right-Click->Paste to put the text in, and if that content came from Word, all hell breaks loose with the markup. The workaround we have so far is to paste into notepad and then to copy that text and paste it into the Rich Text Field, but that solution is inelegant and I hate it. Thank you for your time. Mark Cassidy Take a look at the setting <property name=

Copying the content from a WebView under WinRT

僤鯓⒐⒋嵵緔 提交于 2019-12-01 00:19:45
I've got a WebView with some HTML content which I want to convert into RTF. I've looked at the RTF conversion functions out there and they all look a little flaky to be honest. So my idea is to copy content from the WebView into a RichEditBox , and save to RTF from there. I've seen this example numerous times. WebBrowser1.Document.ExecCommand("SelectAll", false, null); WebBrowser1.Document.ExecCommand("Copy", false, null); Unfortunately, WinRT's WebView control doesn't have a Document property, so I can't do this Is there any way to pull the content from the control? To be clear, I don't want

How to send email in richtext format to Outlook?

 ̄綄美尐妖づ 提交于 2019-11-30 20:39:31
It works great to send emails (to Outlook) in HTML format by assigning the text/html content type string like so: using (MailMessage message = new MailMessage()) { message.From = new MailAddress("--@---.com"); message.ReplyTo = new MailAddress("--@---.com"); message.To.Add(new MailAddress("---@---.com")); message.Subject = "This subject"; message.Body = "This content is in plain text"; message.IsBodyHtml = false; string bodyHtml = "<p>This is the HTML <strong>content</strong>.</p>"; using (AlternateView altView = AlternateView.CreateAlternateViewFromString(bodyHtml, new ContentType

How to paste rich text into a UITextView?

好久不见. 提交于 2019-11-30 08:49:19
问题 My app allows users to format text in a UITextView by clicking some formatting buttons that apply attributes to the attributedText property of the text view. I want to allow users to copy their formatted text from one UITextView and paste it into another using the standard pasteboard and standard cut/copy/paste menu. Currently if I copy formatted text from a UITextView and paste it into a new message in the Mail app, the formatting is preserved -- so the copying of formatted text is happening