nytimes / ice

track changes with javascript
Other
1.71k stars 194 forks source link

The ICE demo -- Contenteditable #109

Closed fatehkamal closed 4 years ago

fatehkamal commented 10 years ago

Running into two issues.

  1. wrapping text incorrectly (it can be reproduced in the demo, see image below). Is this a bug?
  2. html tags within the copy are processed. For example, this [strong]text[/strong] is rendered as text. Is there a way to turn this functionality off? nytimes_github_io_ice_demo_
delambo commented 10 years ago

Thanks for reporting. Can you give me steps to reproduce?

fatehkamal commented 10 years ago

Issue wrapping text incorrectly:

  1. Open demo
  2. Go to start of a blank line
  3. begin typing
  4. when the curser reaches the end of the line and you are in the middle of typing the word, instead of the entire word moving to the next line only the remaining letters are moved to the next line.

FYI -- I am using the chrome browser on a mac book pro.

delambo commented 10 years ago

I don't recall seeing this bug before. What's happening is that every space is converted to   so the browser doesn't get a break to wrap newlines. This may be a new issue from a recent chrome update.

fatehkamal commented 10 years ago

We have been trying to deal with this issue since early April. We can not reproduce in Safari (but who uses that!) ;0)

Do you think you can provide a fix?

delambo commented 10 years ago

Just tested on Chrome version 24 (randomly selected) from early 2013 and I cannot replicate. This may take some time to fix. I can try to find a workaround and/or open an issue against Chrome. Neither will be fun.

fatehkamal commented 10 years ago

@delambo we would really appreciate your help. We are extremely excited about being able to use ICE. However, with the text wrapping issue, we can not deploy it with out a fix. Anything you can do would be highly appreciated.

johanneswilm commented 10 years ago

@fatehkamal : Why did you close the issue? @delambo: As you know, contenteditable is seriously broken and browser manufacturers don't seem willing to fix it. They now claim that anyone doing more advanced stuff has moved on to a pure javascript solution anyway (discussions on www-style list).

Also, Chrome has a plan of moving certain features into javascript. One of their first targets has been Document.execCommand() https://groups.google.com/a/chromium.org/d/msg/blink-dev/XXyHw-X841A/nxN4XkXivdIJ .

This may be related, because otherwise they are not really changing/fixing anything in the editor area.

This is all highly annoying, and we are considering a more permanent solution, such as moving to a Codemirror based solution.

fatehkamal commented 10 years ago

I mistakenly closed the issue. Sorry about that.

@johanneswilm Are you suggesting that we should not use contenteditable? If so, what other options are there? We simply need a Rich text Editor with multi user track changes capability. This seems to be the perfect solution.

fatehkamal commented 10 years ago

@delambo : Do you have any suggestions on how we can resolve this issue? Any feedback would be highly appreciated.

Thanks in advance.

fatehkamal commented 10 years ago

@delambo Any luck with a work around on the non-breaking spaces issue?

Thanks.

fatehkamal commented 10 years ago

@delambo Is there anyway you could provide us with a bit of support regarding the text wrapping issue? Please reply. Thanks in advance. -fateh

johanneswilm commented 10 years ago

Hey guys, I have a bit too busy to try to look into fixing this.

However, there is now a W3C task force set up to try to look into generally fixing the editable stuff. It seems everyone there agrees that this is some work that ICE could benefit a lot from. Would be really cool if someone from the core ICE team could join this: http://lists.w3.org/Archives/Public/public-editing-tf/ @delambo