Create a new HTML resource and insert a reference to it
Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
-
- Posts: 98
- Joined: Tue Mar 06, 2018 2:07 pm
- Contact:
Create a new HTML resource and insert a reference to it
Hello,
I manage a HTML table of content and I would like to implement an action that permit to create a new file and insert a reference on it in the TOC content.
I saw that following dialog exist, but I don't know how to invoke it in javascript in my framework and get the result URL.
It's a similar behavior than when you click on "Create a new DITA resource and insert a reference to it" in DITA toolbar.
Regards,
Nicolas
I manage a HTML table of content and I would like to implement an action that permit to create a new file and insert a reference on it in the TOC content.
I saw that following dialog exist, but I don't know how to invoke it in javascript in my framework and get the result URL.
It's a similar behavior than when you click on "Create a new DITA resource and insert a reference to it" in DITA toolbar.
image.png
Thanks for any help.Regards,
Nicolas
You do not have the required permissions to view the files attached to this post.
Nicolas Delobel
AmeXio
nicolas.delobel at amexiogroup.com
AmeXio
nicolas.delobel at amexiogroup.com
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: Create a new HTML resource and insert a reference to it
Hello,
The dialog displayed when the "Create a new DITA resource and insert a reference to it" action is invoked is not API but you can create your own dialog. You can use the "Template Chooser" component that is provided in template-chooser.html resource. For example, you can see it on our demo server here (you can also find it on your server at the similar location):
https://www.oxygenxml.com/oxygen-xml-we ... ooser.html
In your dialog you can insert the Template Chooser in an iframe, and then listen to the CustomEvent (of 'templateChooserEvent' type) that is triggered when the user selects a template. This event will provide you details about the selected template and its content request URL.
The dialog should also contain the field for file name. When the dialog is closed you can invoke an operation that inserts a fragment in the document.
ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation
To invoke the operation you can use the following API:
https://www.oxygenxml.com/maven/com/oxy ... on__anchor
Best Regards,
Mihaela
The dialog displayed when the "Create a new DITA resource and insert a reference to it" action is invoked is not API but you can create your own dialog. You can use the "Template Chooser" component that is provided in template-chooser.html resource. For example, you can see it on our demo server here (you can also find it on your server at the similar location):
https://www.oxygenxml.com/oxygen-xml-we ... ooser.html
In your dialog you can insert the Template Chooser in an iframe, and then listen to the CustomEvent (of 'templateChooserEvent' type) that is triggered when the user selects a template. This event will provide you details about the selected template and its content request URL.
The dialog should also contain the field for file name. When the dialog is closed you can invoke an operation that inserts a fragment in the document.
ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation
To invoke the operation you can use the following API:
https://www.oxygenxml.com/maven/com/oxy ... on__anchor
Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 98
- Joined: Tue Mar 06, 2018 2:07 pm
- Contact:
Re: Create a new HTML resource and insert a reference to it
Hello Mihaela,
Thanks a lot for your answer.
Now I understand well how to insert a template chooser, get the URL and insert a reference.
What I don't understand is how create the new file in my CCMS?
Thanks.
Regards,
Nicolas
Thanks a lot for your answer.
Now I understand well how to insert a template chooser, get the URL and insert a reference.
What I don't understand is how create the new file in my CCMS?
Thanks.
Regards,
Nicolas
Nicolas Delobel
AmeXio
nicolas.delobel at amexiogroup.com
AmeXio
nicolas.delobel at amexiogroup.com
-
- Posts: 517
- Joined: Thu Sep 04, 2014 4:22 pm
Re: Create a new HTML resource and insert a reference to it
Post by cristi_talau »
Hello,
Once you have the URL of the file to be created and the content of the template, you can invoke a Java AuthorOperation that creates the file.
We have a sample plugin that reads a file from the CMS [1]. This code can be adapted to write the file instead of reading it [2].
Best,
Cristian
[1] https://github.com/oxygenxml/web-author ... le-as-text
[2] https://github.com/oxygenxml/web-author ... e.java#L32
Once you have the URL of the file to be created and the content of the template, you can invoke a Java AuthorOperation that creates the file.
We have a sample plugin that reads a file from the CMS [1]. This code can be adapted to write the file instead of reading it [2].
Best,
Cristian
[1] https://github.com/oxygenxml/web-author ... le-as-text
[2] https://github.com/oxygenxml/web-author ... e.java#L32
-
- Posts: 98
- Joined: Tue Mar 06, 2018 2:07 pm
- Contact:
Re: Create a new HTML resource and insert a reference to it
Thanks Cristian for your answer.
Nicolas Delobel
AmeXio
nicolas.delobel at amexiogroup.com
AmeXio
nicolas.delobel at amexiogroup.com
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