danhper / atomic-chrome

Edit Chrome textareas in Atom
https://goo.gl/Et0hwg
MIT License
916 stars 30 forks source link

Special Handling for Workflowy: Part 3 #17

Open drosenstark opened 8 years ago

drosenstark commented 8 years ago

Please see Other Workflowy Related Issues

Description of Problem

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

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 commented 8 years ago

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 commented 8 years ago

@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 :smile:

drosenstark commented 8 years ago

Testing using instructions here

drosenstark commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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!