Open mikisvandijk opened 1 year ago
Indeed, properties are single lines that don't support newline characters.
There is a ${wordwrap:count:expression}
expression that can be used to break the text every count
characters.
See https://github.com/archimatetool/archi/wiki/Label-Expressions
@jbsarrodie It is possible to render \n
characters in PropertiesRenderer
if we replace \\n
chars with \n
I can't remember if there is a reason for not doing this?
I think that would solve the issue :-)
Indeed, properties are single lines that don't support newline characters.
Well, in fact properties support newlines characters, it's just that we don't allow one to add them through the UI (newline is caught to validate the content and removed when pasting content). If you set a property using jArchi you can set it to contain newlines if you want (I use this for multilang models). This is of course a side effect of jArchi, but I've never had any issues but more test should be done to see if it impacts reports/exports.
@jbsarrodie It is possible to render
\n
characters inPropertiesRenderer
if we replace\\n
chars with\n
I can't remember if there is a reason for not doing this?
The idea was to only replace \n
used in label expressions themselves. If we start doing if for properties, then someone will expect it to also work on name, documentation... But if we do it everywhere, then it is no more possible to not render them, while this might be wished if (e.g.) documentation field contains some code sample.
I see two options here:
⤶
). This requires a way to edit the content ((maybe by using some combination of keys, or by adding small property content editor).\n
, for example ${nl:some_text_or_expression}
I can see two places where the UI restricts single lines:
User can enter CRs in Documentation/Mult-line fields.
Enable newlines in properties themselves and find a good way to render them in the property UI which is singeline (maybe replace them by some unicode icon-like character like ⤶). This requires a way to edit the content ((maybe by using some combination of keys, or by adding small property content editor).
Isn't entering a \n
character in a property table pretty much the same thing?
Isn't entering a \n character in a property table pretty much the same thing?
Actually, I understand what you mean - to insert actual newlines (
in XML)
I am creating a set of views each showing one of 18 capabilities we have defined and some information about it.
I'm showing the information in a note, and when I insert the text I want to display, I can format it using newlines. I works fine.
But for clarity in the model and reusability, I prefer to define the text to be shown as a property of the capability. When I connect the note to the capability, I can use a label expression to show the desired information:
$connection:target{property:platform}
But I cannot work out how to use newlines, a feature I certainly need to create something presentable.
I tried entering a \n in the property text, or pasting a text with a newline into the propety, but that doesn't do the job.
Can you please help me by explaining me how to do it, present a workaround or maybe handle this as a feature request. Thanks!