Hi
Is is possible to mark a element's attributes read-only in CSS, but still be able to modify the element itself?
Version: Web author 18.0.0
Thanks
read-only attributes
-
- Posts: 141
Re: read-only attributes
Hello,
In Web Author an attribute can be edited either inline using a form-control or by using the "Attributes" side-view.
If you want an attribute to be read-only, you can remove from CSS any form-control that edits that attribute. Regarding the "Attributes" view, we have Java API [1] that allows one to completely hide the attribute from the UI. To use this Java API, you should create a plugin [2].
Best,
Cristian
[1] https://www.oxygenxml.com/InstData/Edit ... playFilter
[2] https://www.oxygenxml.com/doc/versions/ ... ugins.html
In Web Author an attribute can be edited either inline using a form-control or by using the "Attributes" side-view.
If you want an attribute to be read-only, you can remove from CSS any form-control that edits that attribute. Regarding the "Attributes" view, we have Java API [1] that allows one to completely hide the attribute from the UI. To use this Java API, you should create a plugin [2].
Best,
Cristian
[1] https://www.oxygenxml.com/InstData/Edit ... playFilter
[2] https://www.oxygenxml.com/doc/versions/ ... ugins.html
Re: read-only attributes
Hi,
I have implemented a CustomProtocolPlugin (this is working fine) and also an AuthorAttributesDisplayFilter, however how do I activate the filter?
Looking at other threads in the forum, it seems that I need to do this via WSAuthorEditorPageBase. Where/how do I get an instance of WSAuthorEditorPageBase so that I can add the filter to it?
Thanks,
Oscar
I have implemented a CustomProtocolPlugin (this is working fine) and also an AuthorAttributesDisplayFilter, however how do I activate the filter?
Looking at other threads in the forum, it seems that I need to do this via WSAuthorEditorPageBase. Where/how do I get an instance of WSAuthorEditorPageBase so that I can add the filter to it?
Thanks,
Oscar
-
- Posts: 36
Re: read-only attributes
Hello,
To add your filter you can implement a ro.sync.exml.plugin.workspace.WorkspaceAccessPluginExtension and override the applicationStarted method:
To register the WorkspaceAccessPluginExtension you need to add it in the plugin.xml file of your plugin as follows:
Best,
Gabriel
To add your filter you can implement a ro.sync.exml.plugin.workspace.WorkspaceAccessPluginExtension and override the applicationStarted method:
Code: Select all
@Override
public void applicationStarted(StandalonePluginWorkspace pluginWorkspaceAccess) {
WebappPluginWorkspace workspaceAccess = (WebappPluginWorkspace) pluginWorkspaceAccess;
workspaceAccess.addEditingSessionLifecycleListener(new WebappEditingSessionLifecycleListener() {
@Override
public void editingSessionStarted(String sessionId, AuthorDocumentModel documentModel) {
documentModel.getAuthorAccess().getEditorAccess().addAuthorAttributesDisplayFilter(YOUR_FILTER_HERE);
}
});
}
To register the WorkspaceAccessPluginExtension you need to add it in the plugin.xml file of your plugin as follows:
Code: Select all
<extension type="WorkspaceAccess" class="com.example.YourWorkspaceAccessPluginExtension"/>
Best,
Gabriel
Return to “SDK-API, Frameworks - Document Types”
Who is online
Users browsing this forum: No registered users and 0 guests