Placeholder text snippet not working with Rich Text Editor snippet

So I had the placeholder for the description box using the code below at the bottom of this message and it worked well.
I then realised I also needed the simple rich text editor snippet - so they can simply use bold and bullet points functions.

But once I put in this snippet here for the rich text editor:


add_filter(
	'hivepress/v1/models/listing',
	function( $model ) {
		$model['fields']['description']['editor'] = true;

		return $model;
	},
  1000
);

The following placeholder text snippet no longer worked:

add_filter(
	'hivepress/v1/forms/listing_update',
	function( $form ) {
		if(isset($form['fields']['description'])){
		  $form['fields']['description']['placeholder'] = 'custom text';
		}

		return $form;
	},
	1000
);

Hi,

Yes, unfortunately, tinymce editor do not have a placeholder. But, as a workaround, I recommend adding a description to the description field, please check this topic Add description to description field

Thank you. I have done the workaround.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.