Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


    <h1>Template Plugin: Advanced Templates</h1>
    <p>This is an example of using more advanced template source with the <a href="" target="_blank">template</a> plugin in TinyMCE 5.</p>
    <p>For this example, the template source is within the TinyMCE init configuration. This will make it easier to
      play with the example. In a real-world use case, you may like to use <a href="" class="_blank">externally hosted templates</a>.</p>
    <p>When using advanced templates like this, place the "<a href="" target="_blanl">mceTmpl</a>"
      class to the wrapper of the actual content you want inserted. TinyMCE will insert this element as the actual template.</p>


                body {
  margin: 2rem 1.5rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial,

main {
  max-width: 720px;
  margin: auto;

section {
  margin-bottom: 3rem;

h1 {
  font-size: 1.75rem;
  font-weight: bold;

a {
  color: rgb(25, 118, 210);
  font-weight: bold;
  text-decoration: none;

a:hover {
  color: rgb(145, 180, 225);



  selector: "textarea",
  plugins: "template code",
  toolbar: "template code",
  menubar: false,

  min_height: 380,
  templates: [
      title: "Advanced Template template example",
        'This template has additional markup that is shown in the "preview" of the template, but is not inserted in to TinyMCE.',
        "<body>" +
        '<p style="color: red; font-weight:bold;">This appears in the template preview, but will not be inserted in to TinyMCE.</p>' +
        '<div class="mceTmpl">' +
        "<p>This is the actual template content that will be inserted.</p>" +
        "<ul>" +
        "<li>And can include nested elements</li>" +
        "<li>So your templates can still include your complex HTML</li>" +
        "</ul>" +
        "</div>" +