Classic editor example

Interactive example

This example shows you how to use TinyMCE Classic Editor.

  • TinyMCE

  • HTML

  • JS

  • Edit on CodePen

<textarea id="classic">
  <p><img style="float: right;" title="Tiny Logo" src="https://www.tiny.cloud/docs/images/logos/android-chrome-256x256.png" alt="TinyMCE Logo" width="128" height="128"></p>

  <h2>The world’s first rich text editor in the cloud</h2>

  <p>
    Have you heard about Tiny Cloud?
    It’s the first step in our journey to help you deliver great content creation experiences, no matter your level of expertise.
    50,000 developers already agree.
    They get free access to our global CDN, image proxy services and auto updates to the TinyMCE editor.
    They’re also ready for some exciting updates coming soon.
  </p>

  <p>
    One of these enhancements is <strong>Tiny Drive</strong>: imagine file management for TinyMCE, in the cloud, made super easy.
    Learn more at <a href='https://www.tiny.cloud/drive/'>Tiny Cloud - Tiny Drive</a>, where you’ll find a working demo and an opportunity to provide feedback to the product team.
  </p>

  <h3>An editor for every project</h3>

  <p>
    Here are some of our customer’s most common use cases for TinyMCE:
    <ul>
      <li>Content Management Systems (<em>e.g. WordPress, Umbraco</em>)</li>
      <li>Learning Management Systems (<em>e.g. Blackboard</em>)</li>
      <li>Customer Relationship Management and marketing automation (<em>e.g. Marketo</em>)</li>
      <li>Email marketing (<em>e.g. Constant Contact</em>)</li>
      <li>Content creation in SaaS systems (<em>e.g. Eventbrite, Evernote, GoFundMe, Zendesk</em>)</li>
    </ul>
  </p>

  <p>
    And those use cases are just the start.
    TinyMCE is incredibly flexible, and with hundreds of APIs there’s likely a solution for your editor project.
    If you haven’t experienced Tiny Cloud, get started today.
    You’ll even get a free trial of our premium plugins – no credit card required!
  </p>

</textarea>
const demoBaseConfig = {
  selector: 'textarea#classic',
  width: "100%",
  height: 500,
  resize: false,
  autosave_ask_before_unload: false,
  powerpaste_allow_local_images: true,
  plugins: [
    'a11ychecker', 'advcode', 'advlist', 'anchor', 'autolink', 'codesample', 'fullscreen', 'help',
    'image', 'editimage', 'tinydrive', 'lists', 'link', 'media', 'powerpaste', 'preview',
    'searchreplace', 'table', 'tinymcespellchecker', 'visualblocks', 'wordcount'
  ],
  toolbar: 'insertfile a11ycheck undo redo | bold italic | forecolor backcolor | codesample | alignleft aligncenter alignright alignjustify | bullist numlist | link image',
  spellchecker_dialog: true,
  spellchecker_ignore_list: ['Ephox', 'Moxiecode'],
  tinydrive_demo_files_url: '../_images/tiny-drive-demo/demo_files.json',
  tinydrive_token_provider: (success, failure) => {
    success({ token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJqb2huZG9lIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.Ks_BdfH4CWilyzLNk8S2gDARFhuxIauLa8PwhdEQhEo' });
  },
  content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }'
};

tinymce.init(demoBaseConfig);