Newbie questions re: DITA-based frameworks

Post here questions and problems related to oXygen frameworks/document types.
jlowther
Posts: 8

Newbie questions re: DITA-based frameworks

Fri Feb 03, 2017 5:44 am

Hello-

I have created a specialization of the <choicetable> element for which I need to write an authoring framework. Here is an example fragment:

<settingtable>
<setrow>
<setname/><setvalue/>
<setrow>
</settingtable>

What I would like to do is:
1. Add "dummy" text to the empty cells (the same way that 'cmd' appears in empty commands and 'title' appears in empty titles).
2. Allow users to just click the usual "Add row below" button in the toolbar to add more <setrow> elements that contain valid row markup. Right now, when I click the button, the new <setrow> contains only a <setname/> element -- I need <setname/> and <setvalue/>.

I assume that I need to edit CSS and create a new action for these two tasks. I appreciate any help. Thanks.
Radu
Posts: 5088

Re: Newbie questions re: DITA-based frameworks

Fri Feb 03, 2017 4:19 pm

Hi,

1. Add "dummy" text to the empty cells (the same way that 'cmd' appears in empty commands and 'title' appears in empty titles).


You need a custom CSS selector. Something like this:

Code: Select all

setname{
  -oxy-placeholder-content:"emptyName";
}


This blog post has some best practices about contributing your CSS customization in a way in which you can share it with others:

http://blog.oxygenxml.com/2016/10/customizing-dita-visual-editing.html

2. Allow users to just click the usual "Add row below" button in the toolbar to add more <setrow> elements that contain valid row markup. Right now, when I click the button, the new <setrow> contains only a <setname/> element -- I need <setname/> and <setvalue/>.


I think we can improve the default Oxygen action for inserting a new row to properly work if the table already contains a row inside it. I will add an internal issue for this.
In the meantime you can extend the DITA framework configuration (you also need to extend the DITA framework for the (1) request) and create your own custom Author action to insert a row in such a table.
The custom action would be defined like this:

https://www.oxygenxml.com/forum/files/insertCustomRowAction.png

and then you could mount it on the menu, contextual menu or toolbar.

https://www.oxygenxml.com/doc/versions/18.1/ug-editor/tasks/dg-configuring-actions-menus-toolbar.html

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

Re: Newbie questions re: DITA-based frameworks

Thu Apr 06, 2017 2:38 pm

Hi,

About my previous remark:

I think we can improve the default Oxygen action for inserting a new row to properly work if the table already contains a row inside it.


Oxygen 19.0 should have a fix for this.

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

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

Who is online

Users browsing this forum: No registered users and 0 guests