Giter Site home page Giter Site logo

Allow more field types about nova-translatable HOT 17 OPEN

mrmonat avatar mrmonat commented on August 28, 2024
Allow more field types

from nova-translatable.

Comments (17)

taliptako avatar taliptako commented on August 28, 2024 3

Cant use trix with withFiles() method

from nova-translatable.

voidgraphics avatar voidgraphics commented on August 28, 2024 2

+1 for markdown field :) would love this feature

from nova-translatable.

YannikFirre avatar YannikFirre commented on August 28, 2024 2

Hello,

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

from nova-translatable.

idragon81 avatar idragon81 commented on August 28, 2024 1

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

from nova-translatable.

lab08tonci avatar lab08tonci commented on August 28, 2024 1

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

from nova-translatable.

mrmonat avatar mrmonat commented on August 28, 2024

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

from nova-translatable.

mrmonat avatar mrmonat commented on August 28, 2024

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

from nova-translatable.

mrmonat avatar mrmonat commented on August 28, 2024

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...

from nova-translatable.

killgt avatar killgt commented on August 28, 2024

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.

from nova-translatable.

kiroushi avatar kiroushi commented on August 28, 2024

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?

from nova-translatable.

mrmonat avatar mrmonat commented on August 28, 2024

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

from nova-translatable.

taliptako avatar taliptako commented on August 28, 2024

@killgt But how ?

from nova-translatable.

d8vjork avatar d8vjork commented on August 28, 2024

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

from nova-translatable.

y-martini avatar y-martini commented on August 28, 2024

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

from nova-translatable.

tomhatzer avatar tomhatzer commented on August 28, 2024

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? 🤔

from nova-translatable.

Ragash avatar Ragash commented on August 28, 2024

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

from nova-translatable.

php-writerman avatar php-writerman commented on August 28, 2024

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

from nova-translatable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.