Does Yammer API returns RichText - windows-store-apps

I'm building a windows store app with Xaml to show yammer feeds, and want to show all the text formatting. Since I present a list view, Would it be possible to add a rich text box in the list view and bind the rich labelled text sent by yammer.
For web view control, when I bind it as part of list view I see that I could not give html text directly via binding property to source.
I see in the return json object of Yammer a field called "rich". Is it the rich text format of the content? If so could I bind it directly to rich text box in windows store app present in the list view?
could some one please help on this.

Since I haven't done windows store app programming, this may not answer your question, but the message.body.rich object does contain the formatted html (with various tags etc.), which can be rendered directly by any browser.

Related

Passing info in a URL to Sharepoint

I'm new to SharePoint but I was wondering if there was a way to pass variables from an external website to a SharePoint Web Part via GET.
e.g.
http://mysharepointpage.com/sites?name=Jay&age=23 does not populate my name or age input fields in the SharePoint Web Part.
Note: I had to remove the <form method="GET"> tags because I kept getting an error advising;
<FORM> tags are not supported in the HTML specified in either the Content property or the Content Link property. You can
remove the <FORM> tag, or use the Page Viewer Web Part, which supports the HTML <FORM> tag. The Content property can
be modified in the Rich Text Editor or Source Editor. More about the Page Viewer Web Part
When I click on the link it tells me;
Cannot display help.
Technical details: HC not found.
I'm guessing this is why I can't retrieve the data via URL.
A little more information as to how would be much appreciated.
Your query string looks correct:
Connect a Query String (URL) Filter Web Part to another Web Part
You will then need to implement javascript on the page to loop through all the keys and populate the form as required.
You should be able to use this link to help you with your javascript or please post what you are currently using: Getting query string values in JavaScript

Tuleap - How to set html content in text field via SOAP API?

We are creating new tracker artifacts using the Tracker SOAP API.
When editing an artefact in Tuleap there is a drop down box to select whether the content of a text field is plain text or html. We want to fill html formatted text into a text field and have it shown as html in Tuleap. But we have found no way how to set the content to html, the html is always shown as plain text until the type is switched manually in Tuleap.
How can "html mode" be activated for html content via the SOAP API?
That's not possible with SOAP https://tuleap.net/plugins/tracker/soap/view-wsdl#op.idp4277600
As you can see, the property "field_value" only supports three sub-properties: value, file_info and bind_value.
Moreover, the SOAP API is now deprecated so will no-longer evolve. The REST API on the other hand does allow to update an artifact text field with html. https://tuleap.net/api/explorer/index.html#!/artifacts/updateId_put

Saving text as HTML from form

I have a form with a text field that users input text into. They can use multiple lines, put in bold text, underlined text, etc., but the text, when saved to SQL Server doesn't have any formatting saved, just the text is saved. What is the best way to save the text with the HTML so that when it gets viewed by another user and pulled up from Sql Server the HTML is saved and the formatting is saved?
Ex.
hello
Paul
This would be saved as
helloPaul
you can't see it but there are bold and carriage return html tags rapped around the text
When receiving data from the user, on the server side code, use HTML encode to safely store the data:
var inputData = Server.HtmlEncode("<strong>some data input from user</strong>"); //insert your user input data variable here
Then when displaying the data in your cshtml page, decode the data to display it as the user entered it:
HttpUtility.HtmlDecode(saveUserDataFromDatabaseVariable);
All this is assuming you have a rich text editor being plugged into the input field. CKEditor and TinyMCE are good ones.
You can use a text editor. Take a look at CKEditor. It's free and easy to use :)
Can you post some code and more details?
I have had good success with CKEditor. It is customizable, and its content can easily be saved via postback to a standard asp:TextBox.
It is possible that the editor you are using is not actually updating the input/textarea that you are using, it may be cloning the text and drawing the formatting in an overlay. You can use developer tools, or javascript, to verify this by checking the value property of the input or textarea element. If it is being saved via AJAX or javascript the code may be using the textContent or innerText properties instead of innerHTML.
I used the richtexteditor dll that's free online. it gave me a wiziwig box that the user can edit texxt in.

Docusign REST API template field overriding pdf field

I'm working with the Docusign Rest API and I'm running into issues with merging pdf fields and Docusign template fields. I have a pdf being sent through Docusign that contains the same field as it's corresponding template. That is working fine, but the issue is when I have filled out information on the pdf.
When the signer gets the envelope, the template places it's text box, check box, signature, etc. over the pdf fields that were filled out. What I would like is to have those pdf fields prevent Docusign from placing those template fields over pre-filled fields in the pdf. Does anyone know a way to achieve this?
If more information is required, let me know. Thank you in advance!
In addition to the solution provided through the above comments, I believe you should be able to get this working just using the form fields. Take a look at the Document Parameters section of the REST API v2 Guide starting on page 100:
http://www.docusign.com/sites/default/files/REST_API_Guide_v2.pdf
If you look at the transformPdfFields property of the request you'll see that it states several aspects about form field conversion:
Transform PDF Fields
Only the FieldTypes and FieldProperties listed below are extrapolated from the forms:
FieldTypes that are extrapolated are: CheckBox, DateTime, ListBox, Numeric, Radio, Text, Signature, and Password.
FieldProperties that are extrapolated are: ReadOnly, Required, MaxLength, Positions, and Initial Data.

dynamic HTML page to pdf

I know there is a list of similar questions but all handle pages without user interaction (static even though some js may be there).
Let's say we've a page the user can interact (e.g. svg than changes, or html tables with drilldown - content changes). Those interactions will change the page. Same happens in stackoverflow when entering the question...
The idea is adding a button, "convert to pdf" taking the state of the html and sending to the user back a pdf version (we've a Java server).
Using the print of the browser is not the answer I'm looking for :-).
Is this a stick in the moon ?
You would have to store the parameters that generate the HTML view (i.e. what the user clicks on, what selections they make, etc). If you can have a list of parameters that generate the HTML view, you can have a method which accepts the list of parameters (JSON post?), generates the HTML view and passes it to your PDF generating routine. I'm not too familiar with Java libraries for this purpose, but PHP has TCPDF can take html output to basically generate a PDF for you. Certainly, there are Java libraries which will allow you to do the same thing, or you can use the parameters to get a list of rows/arrays which can be iterated over and output using the PDF library of your choice.
Both iTextPDF and Aspose.PDF would allow you to do that (I've seen them used in two different projects), but there is no magic and you will have to do some work.
The steps are roughly:
Get (as a string) the part of the document which you want to print with jQuery or innerHTML
Call a service on the server side to convert this to PDF
[Serverside] Use a whitlist - based tool to clean up the hmtl (unless you want to be hacked). JSoup is great for that.
[Serverside] Use IText or Aspose API to create the PDF from the HTML (this is not trivial, you will have to read the doc)
Download the document
I'd also recommend DocRaptor, an HTML to PDF API built by my company, Expected Behavior.
DocRaptor uses Prince XML to generate PDFs, and thus produces higher quality results than similar products.
Adding PDF generation to your own web application using our service is as simple as making an HTTP POST request to our server.
Here's a link to DocRaptor's home page:
DocRaptor
And a link to our API documentation:
DocRaptor API documentation