HTML Snippet

 

The HTML Snippet allows you to add a small piece of HTML, JavaScript and CSS code inside the content area on your site.  You can use this functionality to easily integrate PayPalTM Buy Now buttons or Shopping cart within your site or add external tools such as Google Analytics, Google AdSense and others. More advanced users can also use the HTML Snippet to integrate small custom-programmed tools and functions inside their SiteKreator website.

 

The HTML Snippet cannot be used for modifying the design, installing back-end scripting on the server or as a substitute of SiteKreator's editing interface for managing website content.

 

To add an HTML Snippet first enable it from the list of Advanced Elements:

  • Roll-over the Control Panel icon in the top right corner in Admin view and select Advanced Elements.
  • In the dialog that opens select HTML Snippet and press Update.

  • The option for adding a HTML Snippet will now appear under the menu option of Content Element icons on the page.

  • Note that the next time you login and wish to be able to add an HTML Snippet you should repeat these steps.

 

After you enabled the HTML Snippet option, you can insert HTML snippets from the Text and Image editor or as a separate element.

 

1. Inserting an HMTL Snippet from the option in the Text and Images editor will let you easily position the snippet among your other text, align it, add the snippet inside a table, etc. To add an HTML Snippet inside Text and Images:

  • Open the Text and Images editor
  • Position the cursor where you wish to have the HTML code and click on the HTML  icon on the formatting toolbar. The snippet will appear as a rectangle.
  • Click on the HTML Snippet rectangle and paste the code in the text box displayed on the right.
  • The snippet will become visible in the Admin View after you submit the Text and Images editor. To make it available for your visitors, do not forget to publish the page.
  • To edit an already added HTML Snippet, open the Text and Images editor and click the snippet icon. Apply the changes in the snippet box on the right, and submit the Text and Images editor.

 

2. You can also insert the HTML Snippet as a separate element. This option will let you hold and delete the snippet easily, but does not allow to easily control the snippet position and add other content elements next to it (other content may only appear above / below the snippet).

  • Roll-over the  Area icon and from the Add menu select   HTML Snippet.
  • Paste the code inside the HTML Code box. Press Add. The content will be displayed on the page.
  • To edit the code of an already added HTML Snippet - click the  HTML Snippet icon.

 

When adding custom code inside an HTML Snippet users are advised to double-check its correctness as faulty code pasted in the HTML snippet can spoil the appearance of a site or cause problems with the proper functioning of SiteKreator's editing tools.

 

See also

 

PayPal Integration tutorial

HTML Snippet FAQ