Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello. For some reason different text property editors (textstring, textarea) render a lot of spaces before and after string.
For example:
<p> @Model.Content.SomeText </p>
renders
" lorem ipsum "
Why and how to fix? Looks like view renders with code-spaces that using for good look of code.
Hi Dmitriy
First of all remove line breaks:
<p>@Model.Content.SomeText</p>
Second - check Umbraco property value, does it contain extra spaces or no.
Thanks,
Alex
Hi, Alex.
It helped, but how to keep code good formating and proper render in same time?
What is the problem with this code?
If you want another formatting and no extra white spaces at the same time, you can use some package or custom code.
I didn't try this package - https://our.umbraco.org/projects/developer-tools/html-minifier/
But it looks like what you need.
No problem with that code, but if I want to do something complicated like loops or other difficult murkup, that code become unreadeble.
I'll take a look on this package, thank you.
You are welcome, please share with the community your results.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
TextString and others property editors render a lot of spaces
Hello. For some reason different text property editors (textstring, textarea) render a lot of spaces before and after string.
For example:
renders
Why and how to fix? Looks like view renders with code-spaces that using for good look of code.
Hi Dmitriy
First of all remove line breaks:
Second - check Umbraco property value, does it contain extra spaces or no.
Thanks,
Alex
Hi, Alex.
It helped, but how to keep code good formating and proper render in same time?
What is the problem with this code?
If you want another formatting and no extra white spaces at the same time, you can use some package or custom code.
I didn't try this package - https://our.umbraco.org/projects/developer-tools/html-minifier/
But it looks like what you need.
Thanks,
Alex
No problem with that code, but if I want to do something complicated like loops or other difficult murkup, that code become unreadeble.
I'll take a look on this package, thank you.
You are welcome, please share with the community your results.
is working on a reply...