8000 It is difficult to copy and paste HTML into inline-editable fields · Issue #6 · k3integrations/k3cms · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

It is difficult to copy and paste HTML into inline-editable fields #6

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

Open
TylerRick opened this issue May 11, 2011 · 2 comments
Open

Comments

@TylerRick
Copy link

If you copy and paste from another website, you get a bunch of extra HTML junk and style information, when all I wanted was the basic HTML paragraphs...

So I copy and paste to a text editor first to remove styles and then copy and paste that into the web page, but sometimes that pastes as a single paragraph (if you pasted inside a div, I think) and sometimes it pastes with a blank paragraph between each actual paragraph (if you pasted inside a p tag -- each newline character that you paste in creates a new paragraph). (This is the behavior in Chrome; Firefox is a bit different.)

This needs to be improved so it isn't so annoying...

The extra paragraphs are preferable over everything in a single paragraph.

Some possible areas of improvement:

  • add a "paste plain text" option? or a "remove styles"/"reset styles to default" command? something so I don't have to paste to a plain text editor first just to get rid of unwanted styles...
  • make it harder to create plain divs when you actually want paragraphs
  • detect that user is pasting and prevent default behavior of creating blank paragraphs when 2 newlines are encountered?

I think we should make it easy to paste (and create from scratch) clean, plain HTML (styled by stylesheet alone) and less easy (though perhaps possible) to paste HTML with all styles and font tags (ick)., etc. left intact.

@jash
Copy link
Member
jash commented May 11, 2011

This is also a problem for pasting from Word, or other word processors.

Note that the current CHSS website the client pasted in a table and liked it. As we don't have a table option in our editor yet, this was a feature, not a bug.

--John

@TylerRick
Copy link
Author

I guess it could be considered a feature in some cases... :-)

Even if we add a "paste as plain HTML" option (or "paste from Word", or whatever), we should definitely try to preserve all important structural markup, which would definitely include tables. It's just the style information I'd want to strip out...

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

No branches or pull requests

2 participants
0