visibility:-oxy-collapse-text; Element Insert Side-effect?

<oXygen/> general issues.
drLocke97
Posts: 6

visibility:-oxy-collapse-text; Element Insert Side-effect?

Wed Oct 09, 2013 10:34 pm

I'm building a CSS style sheet for editing that uses form controls in the CSS (Oxy version 15.1 64bit).

As suggested by Oxygen Help, I'm using the visibility property to prevent editing of the elements content outside of the form control using "visibility:-oxy-collapse-text;". This works as expected.

However, it appears there's a side-effect of using this property: it prevents insertion of new elements. The reason appears to be as follows: Oxygen Help says regarding the visibility:-oxy-collapse-text; property

"If an element is marked as -oxy-collapse-text you are not able to position the caret inside it and edit it." (http://www.oxygenxml.com/doc/ug-editor/ ... nsion.html)

It seems that a side-effect of this is that you also cannot locate the caret in an element with a form control and insert a new element. For example, if I have elements "a", "b", and "c" in my Schema defined as consecutive siblings, and in my document I have "a" and "c" and use form controls to edit them, I have no way to enter "b" between them.

Is this expected behavior? Am I missing some way to

(1) use form controls for a series of elements
(2) hide the text content from appearing outside the form control
(3) while still allowing me to select an element and insert a new element after it
alex_jitianu
Posts: 649

Re: visibility:-oxy-collapse-text; Element Insert Side-effec

Thu Oct 10, 2013 10:24 am

Hello,

If you mark an element as -oxy-collapse-text you will not be able to position the caret inside it. Referring to your example, if you mark just a,b,c as -oxy-collapse-text then you will still be able to position between them and insert elements. If you are not able to do that it means that you've marked their parent element as being -oxy-collapse-text. Is that correct? If marking the parent was not the desired behavior then you can just remove -oxy-collapse-text from the parent and you will be able to position between a,b,c and insert elements. If you require the parent element to be -oxy-collapse-text then you could let the user insert elements through inline actions (oxy_button) as they can execute in -oxy-collapse-text contexts too.

Have I understood your situation correctly?

Best regards,
Alex
drLocke97
Posts: 6

Re: visibility:-oxy-collapse-text; Element Insert Side-effec

Thu Oct 10, 2013 3:23 pm

Hi Alex,

Yes, you are exactly correct. I had mistakenly assigned the "-oxy-collapse-text" property to the parent element. I discovered this shortly after my question was submitted, but before it was approved.

It would be a good idea to add a note about this on the Help page for the "-oxy-collapse-text" property.

Thanks
alex_jitianu
Posts: 649

Re: visibility:-oxy-collapse-text; Element Insert Side-effec

Thu Oct 10, 2013 4:44 pm

Hi,

I'm glad to hear that's all it was. I'll take a look again at our documentation and perhaps we will also add an example to help avoid confusion in the future.

Best regards,
Alex
kumarmanish
Posts: 28

Re: visibility:-oxy-collapse-text; Element Insert Side-effec

Mon Jun 15, 2015 3:33 pm

Hi Alex,

What is the alternate solution of visibility:-oxy-collapse-text?

Could you please help me because i am facing the issue.

Thanks,
Manish
alex_jitianu
Posts: 649

Re: visibility:-oxy-collapse-text; Element Insert Side-effec

Tue Jun 16, 2015 8:46 am

Hi Manish,

You can use button form controls to insert elements in areas marked as -oxy-text-collapse. I've given a more detailed answer on this thread: post34341.html#p34341 . Hope it helps.

Best regards,
Alex

Return to “Other Issues”

Who is online

Users browsing this forum: No registered users and 3 guests