atomic-chrome
atomic-chrome copied to clipboard
Special Handling for Workflowy: Part 3
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 usecontentItalics
and underline usescontentUnderline
<BR><BR>Multiple formats are delimited with spaces in theclass
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.
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
@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:
Testing using instructions here
Hey Daniel, thanks so much for doing this. Results:
- Links are perfect
- Bold/Italics are getting replaced with new-lines, which changes the content
Thanks! Dan
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!
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!