Sferyx JSyndrome HTML Editor Component Edition
Custom XML Tags Integration Manual for the Java HTML Editor
1. Custom XML tags are supported - how can I use them?You can create easily your own grammar
specification for handling custom tags or turn on the automatic
grammar builder which will inspect the document and create
automatically the grammar for you. This can be done the
following way:
htmlEditor.setXMLMode(true); for manual tag handling see question #3 below. This is
illustrated in the example provided in the demo version of the
Sferyx Java HTML Editor in the
folder examples/custom tags . You can provide your own component
which responds to actions and displays custom dialogs. This is
fully customizable behavior.
You can consider a code
for creating custom components like the example below - you can
easily assign any kind of action, dialogs etc. The components
created this way will be displayed inside the editor through the
registered custom using the method registerEmptyCustomXMLTagComponentRepresentation
which can be found in sferyx.administration.editors.CustomXMLTagsGrammarSpecification,
see the example in question #3 below
public class MyCustomEmptyTag extends sferyx.administration.xmlcomponents.GenericEmptyXMLTagComponent {
public MyCustomEmptyTag()
Element elem=getElement(); }
class MyActionListener
implements ActionListener
public void
actionPerformed(java.awt.event.ActionEvent actionEvent)
JOptionPane.showMessageDialog(null,"You clicked on the custom tag!"); } } }
|
Custom rendering for block tags can be easily provided through style sheet definition for the relative tag name or html class or id. For empty tags you can provide full components to be used inside the document and also add entirely interactive functionalities with this.
You can define a custom class for rendering of empty tags like this:
sferyx.administration.editors.CustomXMLTagsGrammarSpecification.registerEmptyCustomXMLTagComponentRepresentation
("my_empty_tag","MyCustomEmptyTag");
where my_empty_tag is the tag name and MYCustomEmptyTag is the full classname for the rendering component to be used
All Sferyx products are assured with continuous e-mail support. With the retail products is included in the price 30 days startup support. Additionally, you can purchase annual support subscription tickets from our web store.
Sferyx offers also a wide range of customization services for its products in order to satisfy any customer requirement. We can adapt our products to fit the customer needs and any kind of integration requirements. We execute also express developments, customization under request, development of new features on demand. You can request a quote at sales@sferyx.com or support@sferyx.com indicating your requirements and the terms of delivery.