Skip to content
This repository has been archived by the owner on May 20, 2020. It is now read-only.

Doesn't give line-break or space #295

Open
UnnitMetaliya opened this issue Jun 28, 2019 · 3 comments
Open

Doesn't give line-break or space #295

UnnitMetaliya opened this issue Jun 28, 2019 · 3 comments
Assignees
Labels
bug can-reproduce bug reports that can be reproduced by the owner, on the then app version snippet-insertion
Milestone

Comments

@UnnitMetaliya
Copy link

UnnitMetaliya commented Jun 28, 2019

Hi user! Please use this template to easily file your issue:

Data

Browser name: -Google Chrome
OS name: - Windows 10
Site where ProKeys is functioning improperly - LinkedIn, Gmail

Description:

Steps to reproduce issue
Doing the following in latest ProKeys version will cause the problem I'm writing about.

  1. Creating new snippet
  2. Using that snippet in LinkedIn message window.
  3. Originally, it copy pastes text with what we specified in our plugin.
  4. Upon, sending message, it ruins the formatting. There are no spaces or line-breaks.

Actual behavior
The above steps result in: sending text in snippet without line-breaks or spaces.

Expected behavior
The following was supposed to happen/should have happened: send the text with format specified in snippet. Means with line-breaks and spaces.


  • [ TRUE] - I have confirmed the issue occurs even after reinstall (and data backup) of ProKeys
    (ignore if not applicable)
@GaurangTandon
Copy link
Owner

Hi, thanks for the report! I can confirm the issue in LinkedIn messaging, it strips away the newlines.

However, I cannot confirm on Gmail. I sent a test email to myself and it did not strip any newlines.

The issue fix is more complicated than just inserting multiple span elements, as #259, I hope to release an update within the next month to tackle this issue. Thanks for your patience!

@GaurangTandon GaurangTandon self-assigned this Jun 28, 2019
@GaurangTandon GaurangTandon added bug can-reproduce bug reports that can be reproduced by the owner, on the then app version snippet-insertion labels Jun 28, 2019
@GaurangTandon GaurangTandon modified the milestones: 3.8.0, 3.7.0 Jul 1, 2019
@GaurangTandon
Copy link
Owner

GaurangTandon commented Jul 2, 2019

Analysis of CE structuring all most popular websites/editors:

  1. LinkedIn messaging, Slack, TinyMCE (all three variants), CK editor

    <p>one line</p>
    <p>second line</p>
    <p><br></p> <!-- blank line -->
    <p>fourth line</p>
    
  2. Gmail, Outlook, Evernote

    <div>one line</div>
    <div>second line</div>
    <div><br></div> <!-- blank line -->
    <div>fourth line</div>
    
  3. Disqus

This guy happens to have contenteditable="PLAINTEXT-ONLY" (which results in prokeys not working there) but also resulting in this structure

<p> <!-- text nodes! -->
"line one"
"line two"
""
"line four"
</p>
  1. WhatsApp follows a similar approach to Disqus, except that their div is labelled contenteditable=true. Honestly this is just too much -_-

Current probably approach: insert first line of text in closest current parent p/div element, then insert remaining lines in new paragraph/div nodes, integrating the last insertion with the next paragraph/div node.

Note: most of salesforce, discord, discourse uses a textbox so they are non-issue here.

@UnnitMetaliya
Copy link
Author

@GaurangTandon This approach didn't solve my issue. Same thing happens after hitting send. On message window, it appears with whatever formatting we specify. The problem occurs after hitting send.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug can-reproduce bug reports that can be reproduced by the owner, on the then app version snippet-insertion
Projects
None yet
Development

No branches or pull requests

2 participants