Get hidden text in author view

Post here questions and problems related to oXygen frameworks/document types.
Denis
Posts: 47

Get hidden text in author view

Fri Mar 20, 2015 12:57 pm

Hi,
we are using the Eclipse Oxygen Author in Version 15.2.

If I drop a content reference into the editor, the author tab shows the reference content. In the text tab are requird elments hidden to remain the xml file valid. Is there a way to get these elements by giving the start and end offset?

Best regards,
Denis
Denis Zygann
KGU Consulting GmbH
http://www.kgu-consulting.com
Radu
Posts: 5862

Re: Get hidden text in author view

Fri Mar 20, 2015 3:03 pm

Hi Denis,

If I drop a content reference into the editor, the author tab shows the reference content.


Yes.

In the text tab are requird elments hidden to remain the xml file valid.


Is this a question? The Text page presents the XML content as it is, it cannot be customized to present content which is not there. It is based on an Eclipse Styled text to which you can gain access using ro.sync.exml.workspace.api.editor.page.text.WSTextEditorPage.getTextComponent().
The text page also has a couple of XML-specific API if you cast it to ro.sync.exml.workspace.api.editor.page.text.xml.WSXMLTextEditorPage.

Is there a way to get these elements by giving the start and end offset?


What elements?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Denis
Posts: 47

Re: Get hidden text in author view

Fri Mar 20, 2015 5:15 pm

Hi Radu,

my problem is a required attribute value in the text tab. If I drop the conref, the required elements and the required attributes will be created in the text tab. Now I have the problem, that a attribute value has to be set on a element in the text tab. If not the xml file is not valid.
I would to set a default value for this attribute, but I need these elements, which are hidden in the author tab. I can look for these elements in the file, but it would be nice, if I could get only the hidden part. Is this possible?

I hope the explaination is a bit more clear.

Best regards,
Denis
Denis Zygann
KGU Consulting GmbH
http://www.kgu-consulting.com
Radu
Posts: 5862

Re: Get hidden text in author view

Fri Mar 20, 2015 5:37 pm

Hi Denis,

I still don't fully understand. I don't understand if your problem is related to editing in the Text editing mode or in the Author editing mode or a mixture of both.

Please see some comments below:

my problem is a required attribute value in the text tab.


Ok, so you are editing the XML content in the Text editing mode.

If I drop the conref, the required elements and the required attributes will be created in the text tab.


You drop something in the Text editing mode from probably a custom view. And you have added a drop listener which creates the conref to that dropped target. Do I understand this correctly?

Now I have the problem, that a attribute value has to be set on a element in the text tab. If not the xml file is not valid.


But you said the required elements and attributes were created when the conref is dropped.

I would to set a default value for this attribute, but I need these elements, which are hidden in the author tab.


When an element makes a conref, it sometimes has required child elements which are hidden by default in the Author editing mode. But they can be edited using the API, they just are not visibile because the DITA CSS sets display:none on them. So you can access those hidden elements in the Author editing mode.

I can look for these elements in the file, but it would be nice, if I could get only the hidden part. Is this possible?


I don't understand your entire interaction with the editor.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Denis
Posts: 47

Re: Get hidden text in author view

Fri Mar 20, 2015 7:39 pm

Hi,

But they can be edited using the API, they just are not visibile because the DITA CSS sets display:none on them. So you can access those hidden elements in the Author editing mode.

You are right, I was blinded...
Thank you!

Regards,
Denis
Denis Zygann
KGU Consulting GmbH
http://www.kgu-consulting.com

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 1 guest