Page 1 of 1

Empty text item possible?

Posted: Fri Apr 12, 2024 4:51 pm
by jgkoehn
I am in need of a text item that has a tag but has no text is this possible?
I would rather not use Zero Width Space etc.

Re: Empty text item possible?

Posted: Fri Apr 12, 2024 8:09 pm
by Sergey Tkachenko
It is possible to add it in code. But on editing, it may be removed.
You can try using a text style having EmptyWidth = 1.

Re: Empty text item possible?

Posted: Fri Apr 12, 2024 8:19 pm
by jgkoehn
I assume by editing, if a user types, but not if the editing is done via code? This is mainly a display with out user editing.

Re: Empty text item possible?

Posted: Fri Apr 12, 2024 8:39 pm
by Sergey Tkachenko
It may be removed only:
- when the user edits this paragraph (it includes calling editing methods that modify this paragraph).
- when inserting this content in another document.
Otherwise, it's ok to use empty text item.
Another solution is using hidden items.

Re: Empty text item possible?

Posted: Sat Apr 13, 2024 12:17 am
by jgkoehn
Can hidden items interact with a mouse hover? I suppose an empty item wouldn't either hmms.

Re: Empty text item possible?

Posted: Sat Apr 13, 2024 9:04 am
by Sergey Tkachenko
But empty text items cannot interact with a mouse pointer as well, because they have zero size.
Visibility of hidden items can be switched on and off.