For standard textareas I use this plugin to create a placeholder. How can I extend tinymce so that this works in this way also.
E.g the default value is read from the
Gaurav's solution works OK, but needs a few changes. I used this modification to make it nearly perfect:
editor.on("init", function(){
tinymce.DOM.addClass( editor.bodyElement, 'content-editor' );
if ( editor.getContent() === "" ) {
tinymce.DOM.addClass( editor.bodyElement, 'empty' );
var pseudoBeforeHeight = window.getComputedStyle(editor.bodyElement, ':before').height;
tinymce.DOM.setStyles( editor.bodyElement, { 'height': pseudoBeforeHeight } );
}
});