visibility:-oxy-collapse-text; Element Insert Side-effect?
Oxygen general issues.
visibility:-oxy-collapse-text; Element Insert Side-effect?
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
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
-
- Posts: 1008
- Joined: Wed Nov 16, 2005 11:11 am
Re: visibility:-oxy-collapse-text; Element Insert Side-effec
Post by alex_jitianu »
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
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
Re: visibility:-oxy-collapse-text; Element Insert Side-effec
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
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
-
- Posts: 1008
- Joined: Wed Nov 16, 2005 11:11 am
Re: visibility:-oxy-collapse-text; Element Insert Side-effec
Post by alex_jitianu »
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
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
-
- Posts: 1
- Joined: Wed May 27, 2015 8:16 pm
Re: visibility:-oxy-collapse-text; Element Insert Side-effec
Post by kumarmanish »
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
What is the alternate solution of visibility:-oxy-collapse-text?
Could you please help me because i am facing the issue.
Thanks,
Manish
-
- Posts: 1008
- Joined: Wed Nov 16, 2005 11:11 am
Re: visibility:-oxy-collapse-text; Element Insert Side-effec
Post by alex_jitianu »
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: http://www.oxygenxml.com/forum/post34341.html#p34341 . Hope it helps.
Best regards,
Alex
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: http://www.oxygenxml.com/forum/post34341.html#p34341 . Hope it helps.
Best regards,
Alex
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service