Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing configuration methods to TranslatedText component #1826

Merged

Conversation

xalabama
Copy link
Contributor

This PR solves the issue #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:

// 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();

Copy link

vercel bot commented Jun 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lunar-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 22, 2024 1:44pm

@glennjacobs glennjacobs merged commit 9afbb43 into lunarphp:1.x Aug 22, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants