(How) is yeoman generated sample fragment color choice supposed to work?(How) is yeoman generated sample fragment color choice supposed to work?https://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1208149472024-03-19T10:24:20Z2024-03-19T10:24:20Z(How) is yeoman generated sample fragment color choice supposed to work?Philipp Kunzhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1208149462021-06-02T15:07:59Z2021-06-02T06:50:53Z<p>i created a fragments project with yeoman. in the page editor it
shows a color choice but that color has no effect.</p>
<p>i quickly found two ways to make it work but which is the correct approach?</p>
<p>Â </p>
<p>1. change html:</p>
<pre> <div class="sample-fragment">
- <h1>
+ <h1 style="color: ${configuration.textColor.rgbValue}">
<lfr-editable id="title" type="text">
Sample fragment
</lfr-editable>
</h1>
</div>
</pre>
<p>Â </p>
<p>2. (alternative) change js</p>
<pre> console.group('Sample fragment');
console.log('fragmentElement', fragmentElement);
console.log('configuration', configuration);
+fragmentElement.style.color = configuration.textColor.rgbValue;
console.groupEnd();
</pre>
<p>Â </p>
<p>i have not found so far a document that describes how that should
work. glad for any hint.</p>
<p>Â </p>
<p>setup details:</p>
<p>created a sample fragments project with
"generator-liferay-fragments": "1.9.1"Â </p>
<p>yarn global add yo generator-liferay-fragments</p>
<p>yo liferay-fragments</p>
<p>yarn run import</p>
<p>and docker run ... liferay/portal:7.4.0-ga1</p>
<p>Â