How to set table in Rich text HTML by Default Value
One answer
Hi,
I run into the same requirements and was able to solve this as following:
First you need to create a default value provider with "Multi-Line HTML" as provider option (see picture).
Source: https://jazz.net/library/article/1003#def-values
You can just save anything as HTML for the moment, because its not possible to directly create a table in there.
After you saved this, you will see in the process configuration something like this:
<defaultValueProvider id="com.ibm.team.workitem.valueproviders.DEFAULT_VALUE_PROVIDER.xxxx" name="Your name of the provider" providerId="com.ibm.team.workitem.common.internal.attributeValueProviders.CustomDefaultHTMLProvider">
<value content="Your text"/>
</defaultValueProvider>
Now you can change this content directly with encoded html.
E.G
<table border="1"><tbody><tr><td>Test</td><td>test</td></tr><tr><td>test</td><td>test</td></tr><tr><td>test</td><td>test</td></tr></tbody></table>
If you save that, it will create a table per default
Hope this helps
</defaultValueProvider>
Now you can change this content directly with encoded html.
E.G
<table border="1"><tbody><tr><td>Test</td><td>test</td></tr><tr><td>test</td><td>test</td></tr><tr><td>test</td><td>test</td></tr></tbody></table>
If you save that, it will create a table per default
Hope this helps
Comments
WenJia Zhang
Mar 03 '25, 4:33 a.m.When I make template, I need to pre create table in Rich Text by using Default Value,I write like <table> ....</table>,Its does not work, and just display the code, then I write like createElement("table")......., It does not work as well