Hi all,
Does anybody know how to store data in a rich text field without the HTML tag? There's an example in the knowledge base section; it has 2 columns ("Notes" with the "Rich text" data type to display and save article data with the html tag and "NotHtmlNote" with the "unlimited length data" data type that stores the article value without the html tag), but I don't know how it works.
Thank you.
Like
The way that the OOTB KB area does it is it binds an attribute to the crt.RichTextEditor control's "plainText" property. This returns the text version of the contents. If you view KnowledgeBase_EditPage you'll see the plainText property there
The attribute there is added to the model in the viewModelConfigDiff, which is how it's bound to automatically save to that path.
Also, a side note, there's a process added from the CoPilot stuff which exists in recent versions that can be used as a subprocess for stripping out HTML tags from text, called "Trim html in text". You can use a process and pass in the InputText parameter and you'll get back the text without the HTML tags in the OutputText param. This would be easy to use as a process to save the unformatted text as well.
Ryan
The way that the OOTB KB area does it is it binds an attribute to the crt.RichTextEditor control's "plainText" property. This returns the text version of the contents. If you view KnowledgeBase_EditPage you'll see the plainText property there
The attribute there is added to the model in the viewModelConfigDiff, which is how it's bound to automatically save to that path.
Also, a side note, there's a process added from the CoPilot stuff which exists in recent versions that can be used as a subprocess for stripping out HTML tags from text, called "Trim html in text". You can use a process and pass in the InputText parameter and you'll get back the text without the HTML tags in the OutputText param. This would be easy to use as a process to save the unformatted text as well.
Ryan