Is it possible to send formatted message from Viber Bot with Markdown or HTML tags?
If yes - then how? What attributes to specify?
Response from Viber Developer Support:
formatting text with our API is only possible for keyboard or rich media buttons, not for text messages.
Good news from future, add a character on both sides without space:
bold with *,
italic with _,
wasted with ~,
monospace with ```.
But the formatted view is rendered only in the mobile version.
Related
I'm pretty new in Sublime Text 3, and I know it allows for a wide customization.
I would like to know how I could make some part of the text bold, italic or underlined, or even coloured, when I'm writing a plain text. It may sound dumb, but I have no idea how to do it and whether I can do it.
Thank you!
Your best bet is to use the MarkdownPreview plugin combined with the LiveReload plugin to display Markdown text written in Sublime as HTML displayed in your web browser. Unfortunately there isn't anything at this time that can display rendered HTML or Markdown in Sublime itself.
EDIT Apparently there is also MarkdownLivePreview, which I wasn't aware of before. I haven't tested it yet, but it's very popular, so you might want to try it.
Is there a way to reduce the size of the text in slack messages just the way we have ways to make the text bold/italics?
For version 4.10.1 the best I was able to come up with was superscript. I typed out my text in a word processor, turned it into superscript, and copy/pasted it back into Slack. This is what it looked like. It's quite small.
No. The Slack markup does not include a feature for changing the font size. Your only formatting options are:
Bold
Italic
Strike-through
Quotes
Inline Code
Lists
See Message Formatting (API docs) and Format your messages (Help Center) for more details.
Another thought: If your aim is to reduce the size of your overall message appearing in a Slack channel I would suggest taking a look at attachments. Those will automatically be shortened and shown with an "Show more" option if its text exceeds 700 chars.
want to integrate Emoji character support in Textfield in j2me application. Can anyone suggest me, how can I achieve it?
For example, In whatsapp and wechat application, TextField does support Emoji keyboard characters, but in my application it shows ? for each character I type using Emoji keyboard.
It seems that the Native Font installed on your device doesn't include those emoji characters, so it's displayed as question mark.
You still can display it by embed your own Font (Bitmap Font) to your application, then draw it manually to the screen : http://developer.nokia.com/community/wiki/How_to_create_custom_fonts_in_Java_ME
Alternatively, you can use LWUIT library to create & incorporate Bitmap Font :
http://docs.oracle.com/javame/dev-tools/lwuit-1.4/LWUIT_Developer_Guide_HTML/cjbcgcdd.html#cjbjcebg
http://docs.oracle.com/javame/dev-tools/lwuit-1.4/LWUIT_Developer_Guide_HTML/cjbcgcdd.html#z400088e1296018
I have a requirement to use multiple font style in UITextView. Like Bold, Italic and Underline text in single Textview. Like:
One word is Bold second may be italic third Underline as per user selection.
I don't think this is allowed to do but still if any one have achieved and want to share. I need this all while enter text and same while displaying.
Thanks
You're right that the standard UITextView does not support rich editing. At the moment there are a few solutions to the problem.
The Omni Group has released their iOS and Mac frameworks under an open source license. These include a very powerful rich text editor (see: OUIEditorFrame.m). These are very powerful but also extremely complex. Their sample iPad app includes the rich text editor example. Further discussion can be found here
Secondly, this guy has been working on a custom rich text editing control and is offering it under a negotiable licensing agreement.
Finally, you can do it all yourself and create an editor control that implements the UITextInput protocol. Aside from the Apple documentation, there are some tips on doing this here.
Why don't you use attributed string and use its property to set the string as you like.
Reference link : https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/AttributedStrings/Tasks/CreatingAttributedStrings.html
I have a Sharepoint list, where one of the columns is plain text - Description. When you edit a list item, Description field is normally a TextArea. I have it programmed that this TextArea is extended with JavaScript to accept rich text (html really), so I have my custom rich text field. The problem is that when I input the rich data everything looks fine but when I save the edited item and then display it, the text is displayed as plain text, not html, so instead of a bold text I get "< b >text< /b >". And I would like it to be displayed as html. What can I do with it?
Edit: I don't want to use the built-in editor, because I need some different behavious.
The code that reads in the text input from the form and saves it to the list will be doing a HTMLEncode operation that replaces
< with <
> with >
and so on (look at the source of the page after a save)
This occurs 'server side' so you won't be able to change this using JavaScript.
You've got two options I think
As F5 mentioned you can create a custom field type with your own behaviour for rendering and update. This is the 'correct' way to do this.
You could change your funky javascript to work on a rich text field, hack into the rendering of the built in RTE and replace it with your own.
Of cource as soon as you are taking input from a user and then rendering it back to your web page you open yourself up to all sorts of nasties such as Cross Site Scripting if you are not filtering out potential bad stuff (the very reason why the HtmlEncode is used) - less of a problem in a typical SharePoint site on an Intranet than a public facing site.
SharePoint supports rich text columns using its own in-built editor. You just have to change the column settings so it allows rich text.
If you are using a JavaScript editor because of browser compatability with the built-in rich text editor then SharePoint will always strip the html from whatever is entered as it expects the input to be plain text.
Re your comments
If you want the field to display in rich text it needs to be a rich text field, by setting it to plain text you are always going to lose your custom formatting.
You need to look into custom field types
So where exactly are the data being displayed incorrectly: on the List Display Form or on a Page Layout? If it's on the Page Layout the fix is easy: create a custom Field Control which will retrieve the value of the field (like SPContext.Current.ListItem["YourField"]) and decode the contents to get HTML instead of encoded HTML entities.