Closed FlorianJacta closed 2 weeks ago
It seems legit that HTML elements are added when in markdown mode (that's the point of markdown: generate HTML tags) and that one would have to set styles differently ...
Can I take this issue?
Sure
I have a question. tgb.text
with md mode is related to the Field.tsx component using reac-markdown?
I updated this code but the behavior doesn't change. Let me know if I'm missing something. Thanks.
@FredLL-Avaiga
Yes it is Did you rebuild the frontend bundle?
Yes, I rebuilt it. I will try again.
UPDATE I found an eslint error. That's why I couldn't see the change.
I tried to fix this issue but there seems no reasonable solution after talking with Fred. I closed my PR. You may change the state of the issue. @jrobinAV Thanks
won't fix:
Stylekit classes usually cannot be applied to text in mode "md" because the markdown creates new tags inside the div that receives the stylekit classes.for example any simple text in md mode will be rendered as <div data-comment="from text comp" class="taipy-text stylekit classes"><p>{text value}</p></div>
Some stylekit classes might have an effect but I would recommend to not use them and use direct styling of the component via CSS.
What went wrong? π€
Some styles in the Stylekit (through the class_name) are not applied when mode="md" is set for text visual element. This prevents the user from changing the text element like he wants.
The issue comes from a user: https://github.com/Avaiga/taipy/discussions/1547
Expected Behavior
The class_name/stylekit should be applied for all styles even with mode="md".
Steps to Reproduce Issue
Style don't work:
Works (but without the Markdown format:
Solution Proposed
This seems to come from a tag surrounding the text and not being a span like the normal visual element.
Version of Taipy
3.1.1 / Develop
Acceptance Criteria
Code of Conduct