-
๐ฌ Ask me about vue, nuxt, laravel
-
๐ซ How to reach me [email protected]
johnathan / nova-trumbowyg Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
๐ฌ Ask me about vue, nuxt, laravel
๐ซ How to reach me [email protected]
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
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.
I tried to install the field in a projecting that is using laravel nova 4.0 and the field is not showing and not getting error
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.
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']
]
]]),
It would be nice a function to always showing the content while viewing it on the details similar to the default text area.
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.
It would be nice if we could find a way to support Trumbowyg plugins with this package.
For example the file upload functionality is part of a plugin and has to be included separately: https://alex-d.github.io/Trumbowyg/documentation/plugins/#plugin-upload
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!
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.
`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.