Right now, using Alfonso's plugin, I'm able to add the placeholder attribute in config.js. However, since I'm adding into config.js, that means all instances will have the same placeholder text, right?
Well, I don't want all instances of my ckeditor to have the same placeholder text because I also noticed he also said :
The value can be set in the configuration or as an attribute of the replaced element
I figured this means that we can put "Type something..." as placeholder text for ckeditor1 and "Blabla..." as placeholder text for ckeditor2. How do I do that? Or that's not what he meant?
I have tried several ways including
var ckeditor = CKEDITOR.replace('ckeditor1');
ckeditor.placeholder = 'Type sometheing....';
and
var config = [];
config['placeholder'] = 'some value'; //or config = [{placeholder:'some value'}]
CKEDITOR.replace("myeditor" , config );
inside that particular page but to no avail... I've also cleared my cache.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…