caouecs / laravel-sirtrevorjs Goto Github PK
View Code? Open in Web Editor NEWSir Trevor JS in Laravel 4, 5, 6, 7, 8 and 9
License: MIT License
Sir Trevor JS in Laravel 4, 5, 6, 7, 8 and 9
License: MIT License
Since the blocktype is 'quote' and not 'blockquote', the converter is not called.
Thanks for putting this together.
Running into the following error.
ErrorException in SirTrevorJs.php line 119:
Fatal error: Class 'HTML' not found
Looking into the source, are you using the Laravel Collective HTML package there?
I try to change the language from en to cn but still it asks for en.js
BTW I am using Laravel 5
It seems that the current version is not compatible with the newest (currently beta) version of SirTrevor. Only the first paragraph is rendered, after that stuff breaks.
It looks like they added some Html features to the serialized, this causes the Parsedown::lines() method to strip the rest.
{"data":[{"type":"text","data":{"text":"<p>Tiramisu lemon drops sesame snaps. Sugar plum macaroon halvah cake candy canes pastry topping. Tart muffin liquorice tootsie roll pudding cheesecake tootsie roll jelly-o.</p><p>Lollipop jelly candy canes pie pastry jujubes wafer. Chocolate bar toffee sesame snaps jelly beans liquorice lollipop. Jelly-o jelly tiramisu carrot cake topping dessert bonbon candy canes marzipan. Bonbon wafer fruitcake fruitcake candy canes.</p><p>Pastry fruitcake pastry tootsie roll soufflé fruitcake tootsie roll gummi bears. Tiramisu pastry toffee chocolate bar candy biscuit topping. Croissant macaroon sweet.</p><p>Brownie croissant biscuit wafer gummi bears sugar plum. Chocolate bar gingerbread ice cream marzipan sesame snaps pastry tootsie roll gummi bears chocolate. Liquorice cake caramels danish chupa chups.</p><p>Candy cupcake danish chocolate cake pudding chocolate bar jelly-o cake. Cake jujubes gummies tootsie roll. Croissant lemon drops chocolate bar. Apple pie brownie halvah chocolate bar icing fruitcake tootsie roll oat cake.</p>","isHtml":true}}]}
Hey @caouecs,
I did something really small that I think could help with a bit of accessibility etc. Please can I add this to the package?
$file_data = $file['url'];
$info = pathinfo($file_data);
$file_name = $info['filename'];
$_return = '<figure class="st-image"><img src="' . $file['url'] . '" alt="' . $file_name . '" />'; "
I have tested and it works fine :)
Cheers
Mark
The insertion of local failed as it's adding an extra slash to the path eg 'sir-trevor-js//locales/en.js'
Please add laravel 5 support
Is the master branch missing the assets? I can't seem to get this to work with laravel anymore...
Would really appreciate it if I could get a copy that works with larval 5 for a project!
I've got a project I'm using this for and would love to be able to push assets to S3. Would require a rework of the upload()
function in SirTrevorJsController
plus some new options in the config.
I was going to take a look at forking then doing some work on it, but just wanted to check it wasn't something available already that I've missed, or something on the roadmap already?
Is there documentation on creating newblock types?
Can I see some examples on how you people integrated this in your backends?
Hey,
I have implemented this into my site and from what I can see its all goine okay.
What I need to know now is how do I implemenet the fields into my views?
Thanks,
Mark
Hey
I cant get it to work with laravel 5.7. It seems like the serviceprovider isnt found. I get the error:
Class 'Caouecs\Sirtrevorjs\SirtrevorjsServiceProvider' not found
I dont think the the command: "php artisan vendor:publish caouecs/sirtrevorjs" have published anything.
Best regards
Søren
Hey,
I have just got this running in another project and its working fine again but its not rendering text on my index views. Its working in the show niew perfectly.
public function index()
{
$posts = $this->post->all();
return View::make('posts.index', compact('posts'));
}
{{ $post->body = SirTrevorJs::transformText($post->body); }}
This just gives me:
{"data":[{"type":"image","data":{"file":{"url":"/uploads/screen-shot-2014-02-27-at-101019png"}}},{"type":"list","data":{"text":" - This is a listso is this\n - and this\n"}},{"type":"text","data":{"text":"Etiam porta sem malesuada magna mollis euismod. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Nullam id dolor id nibh ultricies vehicula ut id elit. Vestibulum id ligula porta felis euismod semper. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.\n"}},{"type":"image","data":{"file":{"url":"/uploads/screen-shot-2014-01-31-at-120345png"}}},{"type":"image","data":{"file":{"url":"/uploads/01_screen-shot-2014-01-31-at-120345png"}}}]}
Have you any idea?
Please install our new product, Sonatype Lift with advanced features
Hey @caouecs
Nothing too major here.
Just been testing this and on the face of it the package seems to be playing nicely with laravel 5 in configuration but on the frontend nothing is happening for instance its not publishing the js files and then rendering them on the front end with the usual tags added.
This results in backbone.js and eventable not working and giving errors. I also noticed the block types in the js in the footer were being rendered out like flat html so I wondered if this was because it needed to spit the selected block types out as {!! !!} laravel 5 items? Not sure might be worth looking at. I also noticed that editing the config file did nothing once saved.
I am not sure if you have played with it yet or if anyone else has but thats whats happening at the moment with me.
Cheers,
Mark
Problem of code with integration of twitter
delete figure tag of https://github.com/caouecs/Laravel-SirTrevorJS/blob/master/src/views/fb/social/tweet.blade.php
Hi,
Upon using Laravel 5 and this package I have come across this error when doing composer install command:
composer require caouecs/sirtrevorjs
Please provide a version constraint for the caouecs/sirtrevorjs requirement: 1.4.11
then I press return and I get this:
Problem 1
- Installation request for caouecs/sirtrevorjs 1.4.11 -> satisfiable by caouecs/sirtrevorjs[1.4.11].
- caouecs/sirtrevorjs 1.4.11 requires thujohn/twitter ~1.2.0 -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Can you help at all...?
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.