Loading...

Code Tag

${ code }
- usage : ${code}

This tag will allow you to add raw code/script within the PSD Text Layer contents. You can draw any paragraph text layer in your PSD, but you should try to keep the size and position of your code layer relative to your design.

Add inline CSS, JavaScript or PHP (PHP requires a server) - as text contents in the layer.
IMPORTANT: PSD takes longer than expected to process text layers with many characters, you should try to keep your code layers minimal or link external files.
This tag works with Paragraph Text only, and is designed for HTML5, PHP, and WordPress outputs.
Remember you can also Link External Files if required, or add external links inside your code layers (see below).

Raw HTML

You can add raw HTML code to your text layer and it will convert as is.

1
2
3
<p style="text-align:center;">
    <a href="//exportkit.com">Click here</a> to return home.
</p>
NOTE: You will likely require an external style sheet, or styles applied to the elements for them to render correctly.
IMOPRTANT: You must draw the size and position of your code layer inside your PSD, all raw elements will render INSIDE YOUR CODE LAYER.

Raw CSS

You can add raw CSS styles to your text layer inside an additional <style /> element, or you can use <link />.

We recommend that you use external links for large CSS files.

Internal <style />

1
2
3
4
5
6
<style>
#contacts_link {
    float:right;
    padding-right:10px;
}
</style>

External <link /> (Recommended)

1
<link rel="StyleSheet" href="your_style_sheet.css" />

Raw JavaScript

You can add raw JavaScript to your text layer inside an additional <script /> element, or link an external .js file.

We recommend that you use external scripts to link large JavaScript files.

Internal <script />

1
2
3
4
5
6
7
8
9
10
<script>
jQuery('<img/>', {
    id: 'contact_icon'
}).appendTo('#details')
.css('left','3px')
.css('top','0px')
.css('width','163px')
.css('height','162px')
.attr('src','../your/path/your_image.png');
</script>

External <script /> (Recommended)

1
<script type="text/javascript" src="your_script.js"></script>

Raw PHP

You can add raw PHP to your text layer as is, but Industry Standard rules apply, you must enclose your PHP code correctly: eg. <?php //your code here ?>.

We recommend that you use include or require to link large PHP files.

Internal <?php ?>

1
2
3
4
<?php
$version = "1.2.8";
echo "Current version: ".$version;
?>

External <?php ?> (Recommended)

1
<?php include "your_code.php"; ?>
LOGIN NOW: Get instant access to our free Online Training - click here.

02. Using The Plugin

03. Layer Support

04. Basic Exports

05. Layer Tags

06. Optimization Tips

07. Complete Exports

DOWNLOAD NOW
🚀 Start saving time and money!