PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, April 19, 2022

[FIXED] How to use Emoji-mart in Laravel

 April 19, 2022     emoji, laravel     No comments   

Issue

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?


Solution

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.



Answered By - ConfusedCopyPaster
Answer Checked By - Katrina (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing