Yii Framework Forum: Yii-Redactor placeholder text is added in db if empty - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Yii-Redactor placeholder text is added in db if empty Yii-Redactor saving placehoder contenet in database

#1 User is offline   gopi_patel 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 10-July 16

Posted 15 September 2016 - 04:49 AM

I am using Yii-Redactor for one of the text and if i don not change content in there it saves placeholder content in database.Code is as below.

echo $form->redactorControlGroup($lesson, 'long_description', [
			'buttons'           => [
				'formatting',
				'|',
				'bold',
				'italic',
				'underline',
				'deleted',
				'|',
				'unorderedlist',
				'orderedlist',
				'outdent',
				'indent',
				'|',
				'table',
				'link',
				'video',
				'image',
				'|',
				'alignment',
				'|',
				'horizontalrule'
			],
			'formattingTags'    => ['p', 'blockquote', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
			'imageUpload'       => $this->createUrl('/media/upload'),
			'imageGetJson'      => $this->createUrl('/media/json'),
			'convertVideoLinks' => true,
			'placeholder' => 'e.g. sdj jfkdj dkfjkld kfjlkdjfkdjflkdjfkldjf ldkjflkdjfdklf kfjk sdfjkldjf kjfskljf sdlkjsdkf jdksfd',
		]);


It should not save placeholder content ..
How can i do that ??
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users