Giter Club home page Giter Club logo

nova-trumbowyg's Introduction

Hi ๐Ÿ‘‹, I'm Johnathan

A software developer from Belfast, Northern Ireland working on the web

  • ๐Ÿ’ฌ Ask me about vue, nuxt, laravel

  • ๐Ÿ“ซ How to reach me [email protected]

Languages and Tools:

arduino css3 git html5 javascript jest laravel linux mysql nginx nodejs nuxtjs php postgresql react reactnative sass tailwind typescript vuejs

johnathan

ย johnathan

johnathan

nova-trumbowyg's People

Contributors

aihowes avatar edwinhoksberg avatar johnathan avatar julianmar avatar talovicnedim avatar wize-wiz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nova-trumbowyg's Issues

alwaysShow() missing vue property

Seems I forgot to commit a property :should-show="field.shouldShow", must have missed it :|. Without it using alwaysShow does absolutely nothing.

Please review the PR, I also committed a new build for dist/js/field.js.

PR #14

Cheers

Quick Fix For 100% Width Enhancement

Just learned of a quick trick for custom components that I think would be beneficial for this field. In your main FormField.vue file, if you add the following -- :full-width-content="true" to your tag, it will create a full width component, instead of instead a .w-1/2 which gives a 50% width.

I could make a PR myself, but such a small change I thought it might be easier for you.

Vendor font not published

Hi,

Installed this on a fresh nova instance to give it a try, and followed the instructions, however the font for the wysiwyg points to a 404:

nova-trumbowyg:1 GET http://nova.test/fonts/vendor/trumbowyg/dist/ui/icons.svg?a61f908579a2fc1a4ead0508c599dd2f 404 (Not Found)

Looks like the font just isn't being published and theres no instructions on how to do so. It doesn't show up under php artisan vendor:publish as an option, and a npm run or watch doesnt do anything either.

How to create custom buttons

Trumbowyg allows custom buttons, but I can't seem to pass the options correctly in this package. Official docs are here...

https://alex-d.github.io/Trumbowyg/documentation/#custom-buttons

The following code, creates and shows the button, but the function isn't fired. A more elaborate function will be required, but this seems like a first step.

Trumbowyg::make('thing')
                ->withMeta(['options' => [                   
                    'btnsDef' => [
                        'testBtn' => [
                            'fn' => "function(){alert('test');}",
                            'ico' => 'blockquote'
                        ]
                    ],
                    'btns' => [
                        ['testBtn']                        
                    ]
                ]]),

Support for alwaysShow()

It would be nice a function to always showing the content while viewing it on the details similar to the default text area.

Hardcoded path to icons.svg

Is there a better solution then to hard code the path to icons.svg? When deploying assets to for example S3 the icons can't be found.

Or maybe a setting to set a custom path.

Question Mark in field content jumps to Global Search

Hey!

Great plugin btw but I'm having troubles when using ? within the content of my field.

Nova has a listener for when ? is pressed and will jump to the global site search. The solution to this was to halt any keydown events within the component from bubbling up to the global listener using @keydown.stop to stop propagation. I tried to fix this myself thanks to information from this issue request but I wasn't able to get it to work with my own experimenting.

If you have any suggestions on how to fix this, that would be a huge help

Thanks!

Class 'Laravel\Nova\Nova' not found when installing via composer

Getting error when installing on Laravel Framework 6.20.24

I do composer require johnathan/nova-trumbowyg

I get the error
Class 'Laravel\Nova\Nova' not found

Can't seem to figure what that class is for?

` - Installing johnathan/nova-trumbowyg (1.0.12): Extracting archive
Generating optimized autoload files

Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover --ansi

Symfony\Component\Debug\Exception\FatalThrowableError : Class 'Laravel\Nova\Nova' not found

at /Users/erwin/laravelproject/vendor/johnathan/nova-trumbowyg/src/FieldServiceProvider.php:22
18| $this->publishes([
19| DIR.'/../fonts/vendor' => public_path('fonts/vendor'),
20| ], 'public');
21|

22| Nova::serving(function (ServingNova $event) {
23| Nova::script('nova-trumbowyg', DIR.'/../dist/js/field.js');
24| Nova::style('nova-trumbowyg', DIR.'/../dist/css/field.css');
25| });
26| }

Exception trace:

1 Johnathan\NovaTrumbowyg\FieldServiceProvider::boot()
/Users/erwin/laravelproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36

2 Illuminate\Container\BoundMethod::Illuminate\Container{closure}()
/Users/erwin/laravelproject/vendor/laravel/framework/src/Illuminate/Container/Util.php:37

Please use the argument -v to see more details.
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
`

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.