Code Monkey home page Code Monkey logo

jquery-emoji's Introduction

关于我

📫 曾就职于明基、微软、5173、驴妈妈、平安等,现为蔚来资深工程师。
⚡ 对C#、.NET、Vue、React、JavaScript、TypeScript、CSS等前后端技术都略知一二。
😄 爱好上网、游戏、看小说,喜欢尝试新的事物。
💬 你可以通过邮件 [email protected] 找到我。

jquery-emoji's People

Contributors

eshengsky avatar iuv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

jquery-emoji's Issues

页面多次创建emoji面板不能正常显示

项目中创建多个emoji,插件内部每次创建的emoji面板的id都是一样的

image

  • 问题代码及解决方法:
    • 这里的所有每次创建时都会进行重置
      image
    • 更改:
      // 索引存在则不重置为0
      if (window.emoji_index === undefined) {
          window.emoji_index = 0;
      }

Infinite scroll page would not trigger emojiParse

So I have infinite scroll page when it reach the bottom, it will load additional page.
like $(window).scroll( function() { getData(); getEmojiParse(); }

function getEmojiParse() {$("#SourceText").emojiParse({})};

The emojiParse only works on the first preloaded page but won't trigger again when the second loaded page comes up.
I don't understand why I can re-initiate javascript again. I put alert in the emojiParse() and it seems to alert that it went through emoji Parse but don't seem to load :laugh:.
Please help!
Still loving your emoji!

Thanks in Advance!

反馈点问题

现在有用户了有Star了, 能添加点功能顺便把bug修复下不...

  • 表情图片大小对显示效果有影响
  • 按钮的定位方式对表情弹出位置有影响
  • flag左右两边能不能不一样
  • 后缀只能是数字, 希望支持自定义
  • 中间的分界符只能是_, 希望支持自定义

Path: dist/img/qq

It works when it is dist/img/qq but if I cut the dist folder and move it into src folder, it doesn't work.

Like I would src/dist/img/qq; the path is not recognized. Or even tried ./dist/img/qq or ../dist/img/qq or /src/dist/img/qq ; the path is not recognized.

The purpose is I am trying to implement it into Visual Studio but can't get the path to recognize the filepath.

Like this emoji but can't get it to work when trying to implement it into my project. Please help!
Thanks in advance.

初始化emoji面板后页面内容有变化时,emoji面板位置显示异常

存在懒加载页面时,emoji面板位置显示异常

image

  • 这里的图片为懒加载,图片加载完成后emoji面板位置没有进行更新
  • 期望在每次打开面板时重新更新下位置,下面是我的更改代码
    •      // 在源码`$(document).on()`内,大概位于197行
          if (target === $(btn)[0]) {
                  var _panelTop,_panelLeft;
                  // 重新计算位置。防止收到图片懒加载之类的影响
                  switch (that.options.position) {
                      case 'topLeft':
                          _panelTop = $(btn).offset().top - $('#emoji_container_' + ix).outerHeight() - 5;
                          _panelLeft = $(btn).offset().left - $('#emoji_container_' + ix).outerWidth() + $(btn).outerHeight();
                          break;
                      case 'topRight':
                          _panelTop = $(btn).offset().top - $('#emoji_container_' + ix).outerHeight() - 5;
                          _panelLeft = $(btn).offset().left;
                          break;
                      case 'bottomLeft':
                          _panelTop = $(btn).offset().top + $(btn).outerHeight() + 5;
                          _panelLeft = $(btn).offset().left - $('#emoji_container_' + ix).outerWidth() + $(btn).outerHeight();
                          break;
                      default:
                          _panelTop = $(btn).offset().top + $(btn).outerHeight() + 5;
                          _panelLeft = $(btn).offset().left;
                  }
                  if (_panelTop !== panelTop || _panelLeft !== panelLeft) {
                      panelTop = _panelTop;
                      panelLeft = _panelLeft;
                      $('#emoji_container_' + ix).css({ 'top': panelTop + 'px', 'left': panelLeft + 'px' });
                  }
                  $('#emoji_container_' + ix)[that.toggleFunc]();
                  that.$content.focus();
              }

在 IE8 下运行错误, 代码有点小 bug

_insertAtCursor() 方法中 else if ((sel = document.selection) && sel.type !== 'Control') { 这个分支中 sel.createRange().pasteHTML(html); 应该是 sel.createRange().pasteHTML(value);, _insertAtCursor 方法没有 "html" 这个参数.

希望支持一下表情面板的位置

现在的表情面板位置默认是向下的,能否有向上的定位呢?因为很多聊天的输入框是在页面最下方的,需要表情面板向上展开更好

重复初始化界面会出现表情图片无法添加以及出现多个重复表情的问题,附我的解决方案

多次初始化一个界面,然后在表情符界面拖动选择,会出现无法添加表情问题,或出现多个重复表情。
image

$("body").on("selectstart", ".emoji_container", function () { return false; });

$("#btnLoad2").click(function () { $("#editor_panel").html(""); $("#editor_panel").html("<div id='editor' contenteditable='true'></div><button id='btn' class='btn btn-sm btn-default'>:)</button>").ready(function () { $("#editor").emoji({ button: "#btn", showTab: false, animation: 'slide', icons: [{ name: "QQ表情", path: "dist/img/qq/", maxNum: 91, excludeNums: [41, 45, 54], file: ".gif" }] }); }); });

Preload picture will stop emojiParse from working correctly

When I load a picture file like >img src="data:image/jpq; base64, some base64data file here" /< then have several emoji like >span :hehe: :haha: /span<. It won't load the emojiParse correctly.

Sorry had to use >< rather than the correct way since it filter out.

Please help.

Thanks in advance!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.