Description

I ran into an issue when pasting text from word or any other word process, the CKEDITOR would add <p>&nbsp;</p> whenever there was a new paragraph. I seen a lot of posts of people having the same issue, so I decided to make this quick module so everyone can use. This module basically does a search and replace to fix the problem. It's very simple so I don't have any commits besides the initial commit.

Project Page: Ckeditor Paragraph Paste Fix
Git Repository: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/albertski/2307735.git

Review of Other Project

Answers to comment

Thanks for reviewing my module!

Comments

tregismoreira’s picture

Status: Needs review » Needs work

1. I think the idea of your module is great, but I think this problem is solved with the module Empty Paragraph Killer. Not?

2. Please put the git clone command for everyone (not just for you). I think you need to set the 7.x-1.x branch as default too.

3. PAReview.sh founded a lot of errors:

FILE: ...r/www/drupal-7-pareview/pareview_temp/ckeditor_paragraph_paste_fix.info
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
3 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------

FILE: /var/www/drupal-7-pareview/pareview_temp/README.txt
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
7 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------

FILE: ...www/drupal-7-pareview/pareview_temp/ckeditor_paragraph_paste_fix.module
--------------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
--------------------------------------------------------------------------------
5 | ERROR | [ ] Doc comment short description must end with a full stop
7 | WARNING | [ ] Line exceeds 80 characters; contains 96 characters
11 | ERROR | [x] Whitespace found at end of line
21 | ERROR | [x] Whitespace found at end of line
33 | ERROR | [ ] Files must end in a single new line character
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...7-pareview/pareview_temp/plugins/ckeditor_paragraph_paste_fix/plugin.js
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
16 | ERROR | Use XHTML style tags instead of
17 | ERROR | Use XHTML style tags instead of
23 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------

4. This module will work without dependencies? There is no dependencie defined in your .info file.

5. Why you don’t used the README template? It’s so cute :)

6. It is good to create a hook_help too.

albertski’s picture

Issue summary: View changes
albertski’s picture

Thanks so much for reviewing my module so fast.

1. My module is different because it fixes the problem in real time right after you paste and it only affects the CKEditor. A lot of our editors paste from MS Word and they see extra space between paragraphs. While I can tell them don't worry about it, just save and it will be fixed, I rather have them see it correctly right after paste.

2. Updated the git link in this page.

3. I fixed all the errors but it is complaining about using <br> instead of <br /> so I am searching for <br>. The problem is that the CKEditor inserts it that way and there isn't anything I can do about that. Do you have any suggestions?

4. I added the ckeditor dependency

5. I updated README to use the template

6. I added hook_help()

albertski’s picture

Status: Needs work » Needs review
PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

PA robot’s picture

Status: Needs review » Closed (duplicate)
Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 1: https://www.drupal.org/node/2326223

Project 2: https://www.drupal.org/node/2307767

As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).

If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.

I'm a robot and this is an automated message from Project Applications Scraper.

albertski’s picture

Status: Closed (duplicate) » Needs review
gonssal’s picture

Status: Needs review » Needs work

The CKEditor plugin will remove any &nbsp; due to the ev.data.dataValue = ev.data.dataValue.replace(/&nbsp;/g,''); line. This is wrong and should only remove <p>&nbsp;</p> strings. You should still leave the line that replaces <p></p> there in case the user set config.fillEmptyBlocks = false in CKEditor settings.

This is a minor one, but in the README.txt you are writing &nbps; instead of &nbsp;.

albertski’s picture

I agree that perhaps they may have the setting like that so I removed the line that was removing <p></p>.

Nice catch in the README.txt. I made the fix with that too.

albertski’s picture

Status: Needs work » Needs review
albertski’s picture

Issue summary: View changes
skdrupal88’s picture

Status: Needs review » Reviewed & tested by the community

Module works good for me, the code is simple and clear.

stborchert’s picture

Hi.
Unfortunately the code of your module is too short and too simple to allow serious reviews and to approve you as git vetted user.

However, we can promote this module manually to a full project if you like.

albertski’s picture

Yes please promote the module manually to a full project.

Any way you can speed up the approval process on my other module (Who Logged In). I have been waiting a couple month on this one. I know I still need to do 2 more reviews :). Sorry just super busy!

Thanks!

stborchert’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your contribution!

I promoted your module to a full project so you can go ahead and add new releases.

New URL: https://www.drupal.org/project/ckeditor_paragraph_paste_fix
Now that this experimental project has been promoted, you'll need to update the URL of your remote repository or reclone it.
git remote set-url origin albertski@git.drupal.org:project/ckeditor_paragraph_paste_fix.git

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

Any way you can speed up the approval process on my next module.

Please take part in the Review bonus system. This system rewards people who are willing to help out with a bonus in the form of a prioritised application queue.

klausi’s picture

Status: Fixed » Closed (fixed)

Closing this one out immediately so that the bot does not complain about two open applications.