Page 1 of 1

Newbie questions re: DITA-based frameworks

Posted: Fri Feb 03, 2017 5:44 am
by jlowther
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.

Re: Newbie questions re: DITA-based frameworks

Posted: Fri Feb 03, 2017 4:19 pm
by Radu
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/custo ... iting.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:

files/insertCustomRowAction.png

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

https://www.oxygenxml.com/doc/versions/ ... olbar.html

Regards,
Radu

Re: Newbie questions re: DITA-based frameworks

Posted: Thu Apr 06, 2017 2:38 pm
by Radu
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