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

Paste From Word Filter is not integrated with BR mode #423

Closed
mlewand opened this issue May 31, 2017 · 5 comments
Closed

Paste From Word Filter is not integrated with BR mode #423

mlewand opened this issue May 31, 2017 · 5 comments
Assignees
Labels
plugin:pastefromword The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. support An issue reported by a commercially licensed client. type:bug A bug.
Milestone

Comments

@mlewand
Copy link
Contributor

mlewand commented May 31, 2017

Are you reporting a feature or a bug?

Bug

Check if the issue is already reported

http://dev.ckeditor.com/ticket/16979

Provide detailed reproduction steps (if any)

  1. Open http://nightly.ckeditor.com/17-04-19-06-08/full/samples/old/enterkey/enterkey.html
  2. Sent enter mode to BR
  3. Paste contents from attached document
  4. Switch to Source Mode

Expected result

<b><i>Paste from word</i></b><br />

Actual result

<p><b><i>Paste from word</i></b></p>

@mlewand mlewand added status:confirmed An issue confirmed by the development team. type:bug A bug. labels May 31, 2017
@mlewand mlewand added this to the 4.7.1 milestone May 31, 2017
@mlewand mlewand added the plugin:pastefromword The plugin which probably causes the issue. label May 31, 2017
@mlewand mlewand modified the milestones: Backlog, 4.7.1, 4.7.2 Jun 7, 2017
@mlewand mlewand added the support An issue reported by a commercially licensed client. label Jun 29, 2017
@msamsel msamsel self-assigned this Jul 13, 2017
@msamsel
Copy link
Contributor

msamsel commented Jul 13, 2017

I'm curious why there can't be just disallowed p element in editor configuration? I assume that, if p tag is allowed, then is nothing wrong when it appears after pasting from word. Or is there any other reason why we need to filter it within "paste from word plugin"?
In my opinion this might result with some further consequences, where:

  • user would like to have paragraph tags in editor after pasting from word, but it won't be possible
  • or paragraphs will be filtered from editor by pasting from word plugin, but not by other plugins, so there appear some inconsistency.

I've made some demo (https://codepen.io/msamsel/pen/zzejwJ) showing up that general disallowContent rules work quite nice and from my perspective seems to be solution for described problem.

@jswiderski do you know some background of this case? Maybe you'll be able to say something more here.

@msamsel
Copy link
Contributor

msamsel commented Jul 17, 2017

@mlewand can you check my comment in a spare time?

@mlewand mlewand modified the milestones: 4.7.3, 4.7.2 Aug 9, 2017
@jswiderski
Copy link
Contributor

jswiderski commented Aug 21, 2017

@msamsel while the diallowedContent removes the unwanted paragraphs, please note that in version 4.5.11 BR mode was doing that by default, with or without ACF. Proposed solution is a workaround at best.

Please also note there are plugins like Div Container which uses Div P. With that disallowedContent rule you can insert the container but its inner P will be removed when e.g. switching to source and back. This was not the case in 4.5.11.

I have also noticed difference in selection (this is probably related to other issue or it is a change in behaviour). In version 4.5.11, you were getting <b><i>Paste from word</i></b><br />^ (the ^ char represents selection) and now you are getting <b><i>Paste from word^</i></b> what causes styles being continued after pressing enter. This is definitely a difference when comparing to version 4.5.11 but which of these two is now considered correct behaviour? Should we continue styles or not?

@mlewand
Copy link
Contributor Author

mlewand commented Aug 22, 2017

Agreed with @jswiderski. In addition to that we're also missing enter mode div integration which should be added after BR mode (#816).

@mlewand
Copy link
Contributor Author

mlewand commented Aug 24, 2017

@Comandeer I'll ask you to review this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin:pastefromword The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. support An issue reported by a commercially licensed client. type:bug A bug.
Projects
None yet
Development

No branches or pull requests

3 participants