Auto-insertion of p in entry when new table is inserted - WEB AUTHOR
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 157
- Joined: Mon Aug 18, 2014 4:11 pm
Auto-insertion of p in entry when new table is inserted - WEB AUTHOR
Hi team,
This is also regarding oXygen 19.1 Web Author customization.
When I insert a CALS table using toolbar icon, I should be able to get <entry> element with <p> inside. ie I want to add content inside <p> only, not directly in <entry>. Currently I will get table with <entry> elements only. I have configured cc_config.xml to get <p> element when we insert a new <entry> using content completion. But this will work only if I insert a new <entry> using content completion.
In the eclipse client, we made it work by using dita.framework. Same change does not work here.
Could you please let me know how we can make it work in the oXygen Web Author 19.1.
Regards,
Shabeer
This is also regarding oXygen 19.1 Web Author customization.
When I insert a CALS table using toolbar icon, I should be able to get <entry> element with <p> inside. ie I want to add content inside <p> only, not directly in <entry>. Currently I will get table with <entry> elements only. I have configured cc_config.xml to get <p> element when we insert a new <entry> using content completion. But this will work only if I insert a new <entry> using content completion.
In the eclipse client, we made it work by using dita.framework. Same change does not work here.
Could you please let me know how we can make it work in the oXygen Web Author 19.1.
Regards,
Shabeer
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: Auto-insertion of p in entry when new table is inserted - WEB AUTHOR
Hi Shabeer,
What you can do is to create a custom insert table operation[1] that inserts the entry elements with paragraph inside.
A second possibility is to create a plugin [2] for Web Author where you can set an ro.sync.ecss.extensions.api.AuthorDocumentFilter [3] to modify all the empty entry elements inserted in the document, to include a paragraph.
[1] Creating and Embedding a Custom Action in the Web Author Interface
[2] Customizing Web Author with Plugins
[3] AuthorDocumentFilter documentation
Best Regards,
Mihaela
What you can do is to create a custom insert table operation[1] that inserts the entry elements with paragraph inside.
A second possibility is to create a plugin [2] for Web Author where you can set an ro.sync.ecss.extensions.api.AuthorDocumentFilter [3] to modify all the empty entry elements inserted in the document, to include a paragraph.
[1] Creating and Embedding a Custom Action in the Web Author Interface
[2] Customizing Web Author with Plugins
[3] AuthorDocumentFilter documentation
Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 517
- Joined: Thu Sep 04, 2014 4:22 pm
Re: Auto-insertion of p in entry when new table is inserted - WEB AUTHOR
Post by cristi_talau »
Hello,
Another alternative is to extend the DITA framework [1], and create a new version of InsertTableOperation[2] that also inserts a paragraph inside each cell. The code sample can be found below
Then, in the "web/framework.js" file of the DITA framework you can replace "ro.sync.ecss.extensions.dita.topic.table.InsertTableOperation" with the fully qualified name of your operation.
Best,
Cristian
[1] https://www.oxygenxml.com/doc/versions/ ... aring.html
[2] https://www.oxygenxml.com/doc/versions/ ... a-api.html
Another alternative is to extend the DITA framework [1], and create a new version of InsertTableOperation[2] that also inserts a paragraph inside each cell. The code sample can be found below
Code: Select all
import ro.sync.ecss.extensions.api.ArgumentsMap;
import ro.sync.ecss.extensions.api.AuthorAccess;
import ro.sync.ecss.extensions.api.AuthorOperationException;
import ro.sync.ecss.extensions.api.WebappCompatible;
import ro.sync.ecss.extensions.api.webapp.WebappRestSafe;
@WebappCompatible(false)
@WebappRestSafe
public class MyInsertTableOperation extends InsertTableOperation {
@Override
public void doOperation(AuthorAccess authorAccess, ArgumentsMap args)
throws AuthorOperationException {
ArgumentsMap args2 = new ArgumentsMap() {
@Override
public Object getArgumentValue(String argumentName) {
if (argumentName.equals(CELL_FRAGMENT_ARGUMENT_NAME)) {
return "<p/>";
}
return args.getArgumentValue(argumentName);
}
};
super.doOperation(authorAccess, args2);
}
}
Best,
Cristian
[1] https://www.oxygenxml.com/doc/versions/ ... aring.html
[2] https://www.oxygenxml.com/doc/versions/ ... a-api.html
Return to “DITA (Editing and Publishing DITA Content)”
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