Skip to content
This repository has been archived by the owner on Mar 11, 2022. It is now read-only.

Allow more field types #4

Open
agustinprod opened this issue Aug 26, 2018 · 17 comments
Open

Allow more field types #4

agustinprod opened this issue Aug 26, 2018 · 17 comments

Comments

@agustinprod
Copy link

I use trix and markdown field types for translatable content, adding support to this field types will be really useful.

@mrmonat
Copy link
Owner

mrmonat commented Aug 26, 2018

I will look further into this, I like the idea :)

@mrmonat
Copy link
Owner

mrmonat commented Aug 26, 2018

Added Trix support in Version 1.1.0 (https://github.com/mrmonat/nova-translatable/releases/tag/1.1.0)

@mrmonat
Copy link
Owner

mrmonat commented Aug 26, 2018

Adding markdown support seems a bit more difficult, because there is no wrapper around the native laravel nova markdown field (like there is for trix), so basically I would have to copy the whole markdown field logic & ui into this custom field...

@agustinprod
Copy link
Author

agustinprod commented Aug 26, 2018

Awesome. Looking at the source, as you say, looks harder for the markdown one... Maybe another approach can be toogling a form level language field changes instead per component, but i'm not really sure if possible.

@kiroushi
Copy link

I guess a MD wrapper will be added in a future release, but in the meantime... how about adding a ->textarea() call to create a textarea instead of an input field?

@mrmonat
Copy link
Owner

mrmonat commented Nov 13, 2018

I guess a MD wrapper will be added in a future release, but in the meantime... how about adding a ->textarea() call to create a textarea instead of an input field?

you can, just don't use the ->singleLine() option

@voidgraphics
Copy link

+1 for markdown field :) would love this feature

@taliptako
Copy link

Cant use trix with withFiles() method

@idragon81
Copy link

I think having this as a Panel Type field would make more sense as it would allow using any component.

@taliptako
Copy link

@killgt But how ?

@d8vjork
Copy link
Contributor

d8vjork commented Mar 28, 2019

Using the actual approach of the package I prefer to have something like a Text field (extending the original from Nova) and adding extra bits like a translatable() option (so then you don't need the singleLine()) and also you don't need to change the name in case that you was using the Spatie's Translatable field block

But I'm agree with @idragon81 we can have both things, a TranslatableTabs and extended fields like I said

@lab08tonci
Copy link

@taliptako, Did you manage to add "withFiles()" support?

@YannikFirre
Copy link

Hello,

has anyone found a solution to make the image field translatable ?

@y-martini
Copy link

y-martini commented Jul 30, 2019

Hello,

has anyone found a solution to make the image field translatable ?

Hi, check this package. It have a lot todo, but basically uses a different approach...

PS: this package is based on astrotomic/laravel-translatable

@tomhatzer
Copy link

tomhatzer commented Aug 21, 2019

Adding markdown support seems a bit more difficult, because there is no wrapper around the native laravel nova markdown field (like there is for trix), so basically I would have to copy the whole markdown field logic & ui into this custom field...

@mrmonat I'm not sure if this would work, but can't you create a small wrapper component for the nova markdown field (https://github.com/laravel/nova/blob/master/resources/js/components/Form/MarkdownField.vue)?

Basically just like this:

<template>
    <markdown v-bind="$attrs"  v-on="$listeners"></markdown>
</template>
<script>
import markdown from 'path/to/nova/resources/js/components/Form/MarkdownField.vue';

export default {
    components: { markdown }
}
</script>

And then include this component in this package here? 🤔

@Ragash
Copy link

Ragash commented Aug 26, 2019

+1 for file upload, it's the very reason to go with trix in the first place

@php-writerman
Copy link

@mrmonat did you have a chance to add Markdown field?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests