trsteel88 / TrsteelCkeditorBundle

Symfony2 bundle for easy integration of the CKEditor WYSIWYG
97 stars 58 forks source link

Required can be set to true #74

Closed tiois closed 10 years ago

tiois commented 10 years ago

To mark a ckeditor field as required, the "required" option must be set to true. Currently, only "false" is accepted.

Some form theme use this attribute to mark the field as required, such as adding an asterisk prior to the field label.

dotlabel-april commented 10 years ago

this probably won't be accepted without a passing test

trsteel88 commented 10 years ago

This won't work. It will mean that html5 validation will be used on the field. The html popup won't be visible because the textarea is hidden and replace with ckeditor.

wadjeroudi commented 9 years ago

@trsteel88

It seems that ckeditor handles the required attribute http://dev.ckeditor.com/ticket/8031 (required="required")

An other sf2 bundle allowed it : https://github.com/egeloen/IvoryCKEditorBundle/pull/51

tiois commented 9 years ago

@wadjeroudi :+1:

trsteel88 commented 9 years ago

Updated. The failing test has been fixed too.

https://github.com/trsteel88/TrsteelCkeditorBundle/commit/d0041f3d72818ab2896c48e13c323d35da4c2dc9

Tagged as v1.8.2 - https://github.com/trsteel88/TrsteelCkeditorBundle/releases/tag/v1.8.2

wadjeroudi commented 9 years ago

@trsteel88

Thank you!

You just forgot to remove the default value in CkeditorType::setDefaultOptions. It should not be true and let the guesser guesses.