Contribute to this guideReport an issue

Using the Editor Placeholder Documentation

The Editor Placeholder plugin allows you to display a placeholder text when the editor content is empty. The placeholder helps users locate the editor in the application and prompts to input the content. It works similarly to the native DOM placeholder attribute used by inputs.

Get Sample Source Code

  • Editor Placeholder
    <!doctype html>
    <html lang="en">
    
    <head>
      <meta charset="utf-8">
      <meta name="robots" content="noindex, nofollow">
      <title>Editor Placeholder</title>
      <script src="https://cdn.ckeditor.com/4.24.0-lts/standard-all/ckeditor.js"></script>
    </head>
    
    <body>
      <textarea cols="10" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href=&quot;https://ckeditor.com/&quot;&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
      <script>
        CKEDITOR.replace('editor1', {
          extraPlugins: 'editorplaceholder',
          editorplaceholder: 'Start typing here...',
          removeButtons: 'PasteFromWord'
        });
      </script>
    </body>
    
    </html>