mirror of
https://github.com/friendica/friendica
synced 2025-04-26 11:50:11 +00:00
The Emojipicker is added to Frio for new posts
This commit is contained in:
parent
44bdff664a
commit
45c1d74750
15 changed files with 8475 additions and 117 deletions
21
view/js/vanillaEmojiPicker/LICENSE
Normal file
21
view/js/vanillaEmojiPicker/LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2022 woody180
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
39
view/js/vanillaEmojiPicker/README.md
Normal file
39
view/js/vanillaEmojiPicker/README.md
Normal file
|
@ -0,0 +1,39 @@
|
|||
# FG Emoji Picker - Emoji picker created with vanilla javascript
|
||||
This is the simplest to use emoji picker built with vanilla javascript.
|
||||
|
||||

|
||||
|
||||
## Benefits:
|
||||
|
||||
- It is only one .js file without css or other files
|
||||
- There is no jQuery or other libraries
|
||||
- Simplicity of usage
|
||||
- Multiple textareas and triggers
|
||||
- Draggable emoji picker container
|
||||
|
||||
## Initialize
|
||||
|
||||
Initialze plugin with ```new EmojiPicker({});```
|
||||
|
||||
## Options
|
||||
|
||||
- Trigger - must be an array of objects. Inside object there are two properties. First is selector, and second - **insertInto** method to define where emoji going to be inserted. If there are multiple 'textarea's - you can provide array of selectors as well. Watch example below.
|
||||
- Close button - **closeButton** method can be true of false depending on whether you want close button on emoji picker or not.
|
||||
- specialButtons - takes color code to change special (move and close) button colors.
|
||||
|
||||
```
|
||||
new EmojiPicker({
|
||||
trigger: [
|
||||
{
|
||||
selector: '.first-btn',
|
||||
insertInto: ['.one', '.two'] // If there is only one '.selector', than it can be used without array
|
||||
},
|
||||
{
|
||||
selector: '.second-btn',
|
||||
insertInto: '.two'
|
||||
}
|
||||
],
|
||||
closeButton: true,
|
||||
specialButtons: 'green' // #008000, rgba(0, 128, 0);
|
||||
});
|
||||
```
|
59
view/js/vanillaEmojiPicker/index.html
Normal file
59
view/js/vanillaEmojiPicker/index.html
Normal file
|
@ -0,0 +1,59 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<!-- UIkit CSS -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/uikit@3.9.4/dist/css/uikit.min.css" />
|
||||
<!-- UIkit JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/uikit@3.9.4/dist/js/uikit.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/uikit@3.9.4/dist/js/uikit-icons.min.js"></script>
|
||||
<style>
|
||||
html, body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="uk-container uk-container-small uk-section">
|
||||
<div class="uk-margin-large">
|
||||
<textarea name="" class="one uk-textarea uk-margin uk-height-medium">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</textarea>
|
||||
<button class="first-btn uk-button uk-button-primary">Start picker</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<textarea name="" class="two uk-textarea uk-margin"></textarea>
|
||||
<button class="second-btn uk-button uk-button-primary">Start picker</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script src="vanillaEmojiPicker.js"></script>
|
||||
<script>
|
||||
|
||||
new EmojiPicker({
|
||||
trigger: [
|
||||
{
|
||||
selector: '.first-btn',
|
||||
insertInto: ['.one', '.two'] // '.selector' can be used without array
|
||||
},
|
||||
{
|
||||
selector: '.second-btn',
|
||||
insertInto: '.two'
|
||||
}
|
||||
],
|
||||
closeButton: true,
|
||||
//specialButtons: green
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
47
view/js/vanillaEmojiPicker/indextest.html
Normal file
47
view/js/vanillaEmojiPicker/indextest.html
Normal file
|
@ -0,0 +1,47 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<style>
|
||||
html, body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div>
|
||||
<textarea name="" class="two uk-textarea uk-margin"></textarea>
|
||||
</div>
|
||||
<div class="uk-container uk-container-small uk-section">
|
||||
<div>
|
||||
<button class="second-btn uk-button uk-button-primary">Start picker</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script src="vanillaEmojiPicker.js"></script>
|
||||
<script>
|
||||
|
||||
new EmojiPicker({
|
||||
trigger: [
|
||||
{
|
||||
selector: '.second-btn',
|
||||
insertInto: '.two'
|
||||
}
|
||||
],
|
||||
closeButton: true,
|
||||
//specialButtons: green
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
BIN
view/js/vanillaEmojiPicker/screenshot.png
Normal file
BIN
view/js/vanillaEmojiPicker/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 68 KiB |
7948
view/js/vanillaEmojiPicker/vanillaEmojiPicker.js
Normal file
7948
view/js/vanillaEmojiPicker/vanillaEmojiPicker.js
Normal file
File diff suppressed because it is too large
Load diff
202
view/js/vanillaEmojiPicker/vanillaEmojiPicker.min.js
vendored
Normal file
202
view/js/vanillaEmojiPicker/vanillaEmojiPicker.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue