CK Editor adds in newlines which are rendered as empty paragraph tags. #39
Comments
I'm looking forward to the result of your investigation. |
I found the source of the problem. It is this function in spree itself that wraps every render of the product description:
It runs on every single render of the product page:
This is not cool and I am going to come up with a way of making sure that spree editor can mandate that spree never runs that function. We can safely assume that our editors will generate the correct HTML for the page and they should most certainly not need to pass through a regex every single time that a user requests for it to be rendered. @radar Do you have any particular way that you would like me to implement this fix? Otherwise I am just going to give it a show and try and make it configurable via something in config. |
Just to show you what is happening: ckeditor generates the following HTML:
And spree, via the product_description function, converts it to the following:
So yes, need to find a solution to this problem before I can use this editor live. |
@stevensouthard Initial investigation complete I guess. Solution pending. I am trying some things now. |
I'm so happy your on this. CK editor is a great addition to spree and Steven On Apr 10, 2013, at 9:49 AM, Robert Massaioli wrote:
|
@stevensouthard Well, I have fixed the bug locally. You can check out these branches:
But now I have to get those changes merged in to spree and that involves writing test cases and stuff: https://github.com/robertmassaioli/spree/blob/master/CONTRIBUTING.md Since it is 1:14am in the morning here I am going to bed. It is unlikely that I will have too much time for this but an help on my changes to get it ready for a proper PR against spree would be much appreciated. |
Thank you for getting that going. I took a look at it and I might Steven On Apr 10, 2013, at 10:14 AM, Robert Massaioli wrote:
|
@stevensouthard There is no reason that you could not backport this change. What you should do is jump on the Spree Core PR and let them know that you would really like them to pull it back into previous versions of spree. But for my purposes I am living close to master. And no problems, any help you could give at all, even to say that this affects you too would help get traction on these issues. Thanks for the support! |
So I made the changes to my fork of spree 1.2.4 and so now do I need On Apr 11, 2013, at 9:48 AM, Robert Massaioli wrote:
|
@robertmassaioli I'm closing this as it should be fixed by your PR |
This means that what our WYSIWYG editors will have their output directly placed in the product description box if they are running in a version of Spree that has accepted this pull request: spree/spree#2874 Conflicts: app/controllers/spree/admin/editor_settings_controller.rb lib/spree_editor/engine.rb
This means that what our WYSIWYG editors will have their output directly placed in the product description box if they are running in a version of Spree that has accepted this pull request: spree/spree#2874
I think that I am running into this exception and then the black lines are being wrapped by paragraph tags in the CK Editor: http://ckeditor.com/comment/62946#comment-62946
I am not sure what the solution is yet. More investigation forthcoming.
The text was updated successfully, but these errors were encountered: