Add tabs/panes to the right panel in Oxygen Web Author

Oxygen general issues.
shreya
Posts: 29
Joined: Mon Jun 27, 2022 9:09 pm

Add tabs/panes to the right panel in Oxygen Web Author

Post by shreya »

In Oxygen Web Author, can we add additional tabs along with separate functionality to those tabs in the right panel ?
mihaela
Posts: 490
Joined: Wed May 20, 2009 2:40 pm

Re: Add tabs/panes to the right panel in Oxygen Web Author

Post by mihaela »

Hello,

Yes, you can create a plugin that uses the JavaScript API to add a custom view in Web Author.

Here is a tutorial about customizing side views:
https://www.oxygenxml.com/maven/com/oxy ... mview.html

This is the link to the JavaScript API documentation:
https://www.oxygenxml.com/maven/com/oxy ... index.html

And here is a sample plugin that contributes an 'Elements' view In Web Author:
https://github.com/oxygenxml/web-author ... ments-view

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
shreya
Posts: 29
Joined: Mon Jun 27, 2022 9:09 pm

Re: Add tabs/panes to the right panel in Oxygen Web Author

Post by shreya »

Is there any way to add functionality to the side panel based on caret position or a specific tag position? How can we fetch any selected element, tag or position to create a contextual functionality?
mihaela
Posts: 490
Joined: Wed May 20, 2009 2:40 pm

Re: Add tabs/panes to the right panel in Oxygen Web Author

Post by mihaela »

Hi,

The ViewRenderer has an editorChanged(editor) callback, received when the focused editor is changed.
You can use sync.api.Editor#getSelectionManager method to obtain the SelectionManager.
Then listen on its SELECTION_CHANGED event to update the view according to the current selection.

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
mihaela
Posts: 490
Joined: Wed May 20, 2009 2:40 pm

Re: Add tabs/panes to the right panel in Oxygen Web Author

Post by mihaela »

Hi,

The following sample plugin creates a custom view that presents the elements that can be inserted at the caret position. It uses the API that I mentioned in my previous post, so you ca use it as an example:
https://github.com/oxygenxml/web-author ... ments-view

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
Post Reply