web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Startspacers / Dynamics 365 for Finance an...

Dynamics 365 for Finance and Operations: Working with HTML Editor

Basheer17 Profile Picture Basheer17 2,720

We can use HTML Editor for rich formatting. It is a custom control we can create our own custom control by following this documentation. We can find it in the standard from Common > Activities > All activities then by opening Activities detail page.

We can do almost all sort of formatting using HTML editor like bold, underlined, italic, colored text, alignments, indentations, changing font style & size, inserting hyperlinks and inserting ordered list etc.

HTML1

Data inserted from HTML editor is saved to database along with formatting information in form of HTML text. We can view the formatted text by clicking on View source from HTML editor.

HTML2

HTML editor controls can have a data field or a data method. Display method works as usual, but Edit method will behave as Display method. To save the data while using a data method we can override the setHtmlContent method of HTML editor.

HTML3

It’s better to have the string length of data field associated to HTML editor as (Memo) as HTML formatting tags will be appended when we use rich formatting.

We can also remove formatting information by removing HTML tags whenever required by code. I found this info here. But it may not work in some cases you can learn more by following the provided link.

System.Text.RegularExpressions.Regex::Replace(‘OURHTMLFORMATTEDTEXT’, “<.*?>”, “”)

There’s more…..

We can also display this HTML formatted text in the reports, all we need to do is from placeholder properties of a textbox change the markup type as HTML.

HTML4


This was originally posted here.

Comments

*This post is locked for comments