CDATA in Input Text Field

I need specify html-text in Input Field. So, that it comes in xml:
flowable:expression<![CDATA** [

test

]]</flowable:expression>.

And when I open my xml in Input field must stand:

test

. And when I save my xml, then must stand
flowable:expression<![CDATA** [

test

]]</flowable:expression> again.

Is there some configuration to make it work?

Thank you in advance!

<flowable:expression><![CDATA[test]]</flowable:expression>

In principle you can easily set data using for example modeling.updateProperties See for example:

const elementRegistry = bpmnJS.get("elementRegistry"),
      modeling = bpmnJS.get("modeling");

const scriptTask = elementRegistry.get("ScriptTask1");

modeling.updateProperties(scriptTask, { script: "[CDATA[test]]" });

However, HTML will be escaped so to avoid potential injection attacks.

Can you please outline your use case a bit more detailed?

1 Like

Thank you. I resolved my issue.

Cool!

If possible, it would be great if you could share what blocked you and how you solved it, so that other users can re-use your solution if they encounter a similar problem.

2 Likes