You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TranslatedText form component are missing some methods to configure if the optionRichtext is enabled. I'am looking for this methods from following Traits:
The methods to configure the component in general won't be attached to the TranslatedRichEditor component, because they won't be attached to the dynamic generated components.
Methods from there should be available on the TranslatedText component. If i see it correct this is also a problem in general for the TranslatedTextInput component.
Actual Behaviour:
Configuration methods should be able to set from the TranslatedText component.
Steps To Reproduce:
Call a TranslatedText component from a form builder instance and try to call one of the methods from the described traits like
TranslatedText::make('translated_text')
->optionRichtext(true)
->toolbarButtons([]);
// or alsoTranslatedText::make('translated_text')
->extraInputAttributes([]);
Not sure if its more a feature request than a bug, in my opinion it could be both.
I think the methods are needed to attach their values inside the TranslatedText method 'prepareChildComponents', wehere the objects are created. I can help to contribute this.
The text was updated successfully, but these errors were encountered:
This PR solves the issue
[#1819](#1819) by providing
missing configuration methods to the TranslatedText component for
RichEditor option. It also allows to pass method parameters to the child
components that they can take an effect there.
Following methods are now available for TranslatedText component:
```php
// For enabled rich editor option only
TranslatedText::make('text-editor')
->optionRichtext(true)
->richtextToolbarButtons() // equal to toolbarButtons on RichEditor
->richtextDisableToolbarButtons() // equal to disableToolbarButtons on RichEditor
->richtextDisableAllToolbarButtons() // equal to disableAllToolbarButtons on RichEditor
->richtextFileAttachmentsDirectory() // equal to fileAttachmentsDirectory on RichEditor
->richtextGetUploadedAttachmentUrlUsing() // equal to getUploadedAttachmentUrlUsing on RichEditor
->richtextSaveUploadedFileAttachmentsUsing(); // equal to saveUploadedFileAttachmentsUsing on RichEditor
// For text input only
TranslatedText::make('text-input')
->tel()
->telRegex()
->email()
->url()
->numeric()
->integer()
->step();
// For both
TranslatedText::make('text')
->regex()
->minLength()
->maxLength();
```
---------
Co-authored-by: Glenn Jacobs <[email protected]>
Expected Behaviour:
The TranslatedText form component are missing some methods to configure if the optionRichtext is enabled. I'am looking for this methods from following Traits:
The methods to configure the component in general won't be attached to the TranslatedRichEditor component, because they won't be attached to the dynamic generated components.
Methods from there should be available on the TranslatedText component. If i see it correct this is also a problem in general for the TranslatedTextInput component.
Actual Behaviour:
Configuration methods should be able to set from the TranslatedText component.
Steps To Reproduce:
Call a TranslatedText component from a form builder instance and try to call one of the methods from the described traits like
Not sure if its more a feature request than a bug, in my opinion it could be both.
I think the methods are needed to attach their values inside the TranslatedText method 'prepareChildComponents', wehere the objects are created. I can help to contribute this.
The text was updated successfully, but these errors were encountered: