Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special Handling for Workflowy: Part 3 #17

Open
drosenstark opened this issue Jun 2, 2016 · 6 comments
Open

Special Handling for Workflowy: Part 3 #17

drosenstark opened this issue Jun 2, 2016 · 6 comments

Comments

@drosenstark
Copy link

drosenstark commented Jun 2, 2016

Please see Other Workflowy Related Issues

Description of Problem

In Workflowy's editor for notes it wraps links, bold, italics and underline.

  • Links - Links are like this <a class="contentLink" target="_blank" rel="noreferrer" href="[SITE]">[SITE]</a>... those links then get converted to text in Atomic Chrome. They then return and get wrapped again... and so on and so on.
  • Formatting - Bold is like this <span class="contentBold">, while italics use contentItalics and underline uses contentUnderline

    Multiple formats are delimited with spaces in the class attribute, e.g., class="contentItalic contentUnderline" (as you would expect from CSS)

Solutions

All of these tags should be removed on extraction to Atom.

I'm not sure this is specific for Workflowy. Any app that loads the contentEditable with HTML should have it expunged when it's moved to Atom, I think.

@drosenstark
Copy link
Author

Note from the author: there is this class for special Workflowy handling, in case someone wanted to fork:

https://github.com/tuvistavie/atomic-chrome/blob/master/src/content-script-tools/custom-events/workflowy.js

@danhper
Copy link
Owner

danhper commented Jun 22, 2016

@drosenstark Hi, sorry this took so long!
I removed the tags when the text is extracted from Workflowy to Atom.
I tried it and it seems to work fine with link, as the links are readded after,
but the bold and italic formatting will I think be lost.
Could you give the master branch a try and tell me how it goes please?
Thank you 😄

@drosenstark
Copy link
Author

Testing using instructions here

@drosenstark
Copy link
Author

Hey Daniel, thanks so much for doing this. Results:

  1. Links are perfect
  2. Bold/Italics are getting replaced with new-lines, which changes the content

Thanks!
Dan

@drosenstark
Copy link
Author

On the other hand, #2 is not a showstopper, so I'd say to go ahead and push master if it's not easy to fix #2. This is already way better and resolves all the HUGE problems with recursion.

Thank you!

@drosenstark
Copy link
Author

I see it now... it's a peculiarity of Workflowy that it puts a \n before and after any formatting. I'd say that we're good to go and publish these changes... they're very helpful and remove all of the true risks. Great work and thanks for your kind attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants