Post html content to an activity with Google + Domains API - google-plus

I'm triying to post HTML content to an activity with the new google + domains API with no success.
Activity activity = new Activity()
.setObject(new Activity.PlusObject().setContent("First line<br><b>second line</b>"))
.setAccess(acl);
Acording to the documentation with setConent you can specify "The HTML-formatted content, which is suitable for display." but when i try to post some html its get displayed as plain text.
I need to create an activity with some linebreaks and bold text. How can i achieve that?
Thanks in advance.

the content (HTML) field is only meant for output, you are not allowed to write in HTML. You should be writing in plain text (as you do in the browser), newlines are respected with normal line breaks (\n)
This field is useful to display formatted posts that contain links etc..

Related

Wikipedia API - How to get rid of Wikipedia hyperlinks/junk

I'm currently using Wikipedia API to get some content that I can use on my website. At the moment when I get content it is all in html or wikitext (both containing Wikipedia hyperlink and a lot of junk in the text). Is there a way around this to just get plain text without having all this junk?
I have tried calling HTML and converting it into plain text but that still contains all of the wiki junk. I want to try and create a universal method that can remove all the junk as I want to be able to call multiple different Wikipedia pages and get plain text for all of these.
HTML:
https://en.wikipedia.org/w/api.php?action=parse&format=json&page=Game_of_Thrones_(season_3)&prop=text&section=1&disabletoc=1
Wikitext:
https://en.wikipedia.org/w/api.php?action=parse&format=json&page=Game_of_Thrones_(season_3)&prop=wikitext&section=1&disabletoc=1
I hope this makes sense, any advice/guidance is greatly appreciated.

How Can I Format a Tumblr Title

Is there a way to format part of a Tumblr title? For example, I'd like to be able to italicize one word in a title. Anyway to do that?
Tumblr reads titles using the {Title} tag, so how it is rendered is determined all at once not word for word. This means that the style of your titles universally depends on the CSS used around them in the hard coding. If you use the traditional manner of titling your posts which is placing the title in the "Title" area, then no this is not possible. An alternative method is to not put a title in that area and instead just post all information into the body.
You would then use the "html" view to code the header as you wish to see it. Default tumblr layouts use h1 /h1 around their headers so this is generally what you would want to use. The reason you are going into html view is because there is no option currently on default tumblr to increase the font size outside of html view.
The very first coding in the html view should be similar to this:
<h1>Title with one word in <i>italics</i></h1>
Once done, turn off html view, press enter to get off of the title line and continue your post.

How to use html tables within tumblr posts

For a public blog we are currently using the default rich text editor.
This as content editors are no html writers.
Now on a certain post / custom page we want to add tabular data using a html table.
The rich text editor in tumblr has no support for creating tables so we switched to the html editor. There we created the table tag and some rows. Everything looks fine until saving the post. On saving the table element seems to be gone...
The Tumblr dashboard strips out many different HTML tags. They're visible in your theme, but on the dash they're either removed without a trace or replaced with a small clickthrough "embedded content" symbol.
If you NEED the table on the dash, you may need to use an image. Personally I'd include the Read More break to direct people into viewing the whole thing on your blog, but that won't work inside the app or slide-in bar, etc.

How can i format the HTML contents of mail in iphone ?

I am using MFMailComposer for mailing.I just convert the contents of URL in a string and use that string to send mail . But the problem is that HTML file contains button link image and when i mail it gives two blank icon with the HTML page.How can i remove that icons before the mail is send.
If it is not necessary to convert URL content to string. Simply pass HTML in MFMailComposer.
But even if you want to detect the TAGs in content of URL then simply parse the whole HTML of URL and check for button(input) tag. and you can check for completed button tag also. Simply ignore the statements between starting and ending point of tags and create another HTML content.

iText header for html

I am generating a PDF using itext 5.0.5.I am reading different mime types image,pdf,html content etc. and then reading those files from database and generating pdf.
There are two type of document user can view a individual document and a collection of documents in one single generated pdf.
I HAVE ONE PROBLEM WITH HTML content pdf header part.This html content is coming from a text area on a form,there a user will get the header information prepoulated in text area then he can type and create document.At the time of pdf generation if i am using page event to generate the header for each page for every mime type document.
For html content the header is coming two times.What i want to do is for html type document on first page header should not be generated for first page.I got the solution for pdf if i am reading the individual document but when i am reading the final pdf which is containing all documents of different mime types then it's not working.Is there any way so that i can do like header will not be generated for html type content's first page for rest of pages it will be generated using page event.
please help.
Perhaps you could use two different pageEvents when dealing with HTML. One that added headers (the current one), and one that set the page event handler to the original one.
You start off with the new one. The first page event comes along, and that new event handler changes the current page event handler. The remaining pages are stamped with headers as usual.