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 1 #15

Closed
drosenstark opened this issue May 13, 2016 · 10 comments
Closed

Special Handling for Workflowy: Part 1 #15

drosenstark opened this issue May 13, 2016 · 10 comments

Comments

@drosenstark
Copy link

drosenstark commented May 13, 2016

Problem

When the text is pulled out of a notes field in Workflowy, it looks like this

1) one thing
2) another thing
3) a third thing

but when it returns to the contenteditable div, the text comes back like this:

<div>1) one thing</div><div>2) another thing</div><div>3) a third thing</div>

While this looks right, when Workflowy subsequently saves it, it strips out the HTML tags and therefore the line breaks.

Solution

I think this problem would be solved if the text came back in with the real line-breaks intact.

Notes

I realize that special handling for one site is hard to consider, but... perhaps it's useful for other sites too?

I have no affiliation with Workflowy, but I must note that it's a great tool and, more importantly for this, it's free to use quite extensively.

Anyway, thanks in advance for even considering this, and for this awesome plug-in/package!

[Note: This issue was edited using Atomic Chrome ;)]

@danhper
Copy link
Owner

danhper commented May 13, 2016

@drosenstark Hi, thanks for reporting!

I added a special handler for workflowy which simply set the value to the current text instead of
doing the usual conenteditable processing (which is needed for Gmail, for example).

I think this should fix your issue, but could you give it a try please before I publish to the Store?
To do so, run the following commands

git clone https://github.com/tuvistavie/atomic-chrome.git
npm install
npm run build

then, remove the currently installed Atomic Chrome from Chrome and from the Manage extensions page,
click on "Load unpacked extension" and select the app folder of this repository.

Thank you 😃

@drosenstark
Copy link
Author

Okay, testing now, thanks...

@drosenstark
Copy link
Author

[I had to install Node for this... first time for everything]

It works perfectly... thank you so much for doing this. This is a huge game changer for me!

@danhper
Copy link
Owner

danhper commented May 13, 2016

Thanks for trying it out! I'll publish a new version to the store then!

@danhper danhper closed this as completed May 13, 2016
@danhper
Copy link
Owner

danhper commented May 13, 2016

0.2.5 should be available on the store within a few hours, thanks for the help 😄

@drosenstark
Copy link
Author

Thank you so much. Awesome stuff!

Looking forward to trying the production version.

Note: so far this new version appears to be working well with this repo by @ryanpcmcquen

@drosenstark
Copy link
Author

Um... maybe I spoke too soon on the cooperation with @ryanpcmcquen's repo. It kind of depends when you click where. HHmmmm....

@danhper
Copy link
Owner

danhper commented May 14, 2016

After checking, it seems workflowy creates a contenteditable div per bullet point,
is this is why you are having trouble?
If this is the issue, I think it is going to be rather complicated to get something working,
as this is quite an edge case.
If you want to try to work on it, I am of course open to PRs!

@drosenstark
Copy link
Author

Sorry Daniel, didn't see your comment here. No, the issue with @ryanpcmcquen's stuff is not a problem with Atomic Chrome (though it could be solved there). Ryan's plugin modifies the contents of the contenteditable div for view only, which WF will overwrite on keydown.

So if the user hits a keydown and THEN hits the Atomic Chrome button, all is good. If the user hits the Atomic Chrome button before that, it gets the modified node.

In Summary

I think we're very good on Workflowy support for now. I'm ecstatic to have it and I think it's great. Thank you!

@danhper
Copy link
Owner

danhper commented May 16, 2016

Hi, Dan,
Great, I am very happy it seems to be working fine for you.
Please feel free to reopen an issue if you find anything else that could be done better.

@drosenstark drosenstark changed the title Special Handling for Workflowy Special Handling for Workflowy: Part 1 Jun 22, 2016
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