Insert XHTML5 CSS and Javascript code:

with PubCoder, you can insert widgets and customized objects into the pages of your book using XHTML5,  CSS and Javascript code.


Schermata 2014-02-25 alle 17.48.50

1- First of all you have to insert a Smartobject onto the stage by dragging it from the Object Panel. After double-clicking on the Smartobject, a “Source” window will appear. In this window you can paste the HTML content of the widget (the code to be pasted must be selected from the inside of the BODY tag.)



Schermata 2014-02-25 alle 17.43.21

2- In the “Page Inspector”, you can now import the folder containing the files needed by the widget to work. The folder will be automatically imported  with the whole file structure, leaving all the links untouched.



Schermata 2014-02-25 alle 17.49.57

3- To link the imported HTML with the JS files in the folder, it is necessary to import the widget headers. By clicking on the “Custom Header” line in the Page Inspector you will be able to fill in the HEAD section of the page and insert the links to the scripts.


The “language=“javascript” attribute is deprecated and must therefore be eliminated. Please use type=”text/javascript” instead.

At this point it is possible to check the widget by clicking on the preview button.


Download the sample file
[advanced_iframe securitykey=”daniela” src=”/wp-content/uploads/examples/Smartobj/OEBPS/assets/1/page.xhtml”]