Hi All,
I'm trying to add a placeholder for a ckeditor text field.
Have tried adding it to the input prompt and also via the CK editor config but it doesn't appear.
Anyone got this to work correctly?
https://ckeditor.com/docs/ckeditor5/latest/features/editor-placeholder.html
Hi,
The document link you provided is for v5, the forge component is currently in v4 and in v4 you need a plugin called confighelper, which is not included in forge component by default.
Regards.
Prasad Rao wrote:
Hi Prasad,
Can you provide an example on how to use the config helper plugin. How to set your own default placeholder text?
Thanks
There are two option here
Option #1:
extraPlugins: 'confighelper', placeholder: 'Test Placeholder',
Option #2: Preferred one
(function() {
CKEDITOR.plugins.addExternal('confighelper','../../CKEditorDemo/ckeditor/plugins/confighelper/', 'plugin.js');
})();
CKEDITOR.editorConfig = function( config ) {
};
customConfig: '/CKEditorDemo/ckeditor/config.js', extraPlugins: 'confighelper', placeholder: 'Test Placeholder',