The syntax is very simple.
Just place a starting {source} tag and an ending {/source} tags in the text area where you want the code to appear (like an article or Custom HTML module).

Then, simply place your code between these tags. For example:

<script type="text/javascript">
    document.write('This text is placed through JavaScript!');

You can place the tags inside your content to output the result of simple or complex PHP code:

Hi {source}<?php echo $user->name; ?>{/source}! Welcome back.

And you can of course also combine multiple codes of various types in one single block:

<h2>Some HTML code here</h2>


<h4>Welcome <?php echo $user->name; ?></h4>

<p>&gt;&gt; And some more funky HTML code!</p>

It's important to note that you should place the code in the WYSIWYG view of the editor, NOT in the HTML/Code view of the editor.

You can find some simple examples of how to place code with Sourcerer in the Examples Page.

You can also use the Sourcerer editor button to make the process even easier.