Home > Software engineering >  How to use Emoji-mart in Laravel
How to use Emoji-mart in Laravel

Time:04-09

Emoji-Mart https://github.com/missive/emoji-mart

i make js file in resource folder /resources/js/map.js

import 'emoji-mart/css/emoji-mart.css'
import { Picker } from 'emoji-mart'

add in webpack.mix.js

.js('resources/js/map.js', 'public/js')

Use

npm run dev

add include in my blade

<script type="text/javascript" src="{{ asset('/js/map.js') }}"></script>

then try use in blade code from readme

<Picker set='apple' />
<Picker onSelect={this.addEmoji} />

But didnt see nothing

this is my first encounter with laravel mix, can you tell me what i'm doing wrong?

CodePudding user response:

Consider using a emoji package which was built to run inside a Laravel application. You are using a react-based plugin which won't work this way.

  • Related