Opened 11 years ago
Closed 11 years ago
#10537 closed Bug (fixed)
shiftEnterMode set to CKEDITOR.ENTER_P doesn't report P tag to ACF
Reported by: | dilip | Owned by: | Piotrek Koszuliński |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.1.3 |
Component: | General | Version: | 4.1 |
Keywords: | Cc: |
Description (last modified by )
EDITED
- Configure editor in the following way:
var editor = CKEDITOR.replace( 'editor1', { toolbar:[ { name: 'document', items : [ 'Source' ] }, { name: 'basicstyles', items: [ 'Bold', 'Italic' ] }, { name: 'styles', items: [ 'Format' ] } ], enterMode : CKEDITOR.ENTER_BR, shiftEnterMode : CKEDITOR.ENTER_P
- Go to page with editor, switch to Source and PASTE
this<p>issue</p>
- Switch to WYSIWYG and to Source one more time
- Result is
this<br />issue
. The same thing happens for this code:<p>issue</p> this <p>issue</p> <p>issue</p>
It seems to me that ShiftEnterMode doesn't report P tag to ACF. To confirm this I have added { name: 'styles', items: [ 'Format' ] }
to toolbar and this time it has worked without problems.
NOTES:
- Problem can be reproduced from CKEditor 4.1
- It doesn't occur if you turn off ACF -
allowedContent : true
or add plugin which reports P tag to ACF - There is different issue (I'm not 100% sure if this is a bug) when you write in editor. Please see #10543.
Attachments (2)
Change History (17)
comment:1 follow-up: 2 Changed 11 years ago by
Keywords: | remove <p> when click on source removed |
---|---|
Status: | new → pending |
comment:2 Changed 11 years ago by
Replying to j.swiderski:
Step 1) set web config like this
config.enterMode = CKEDITOR.ENTER_BR; config.shiftEnterMode = CKEDITOR.ENTER_P;
Step 2) in source write "this<p>issue</p>"
Step 3) click again in source (design mode) Step 4) now click again in source (source mode)
check source it remove the p tag and you will find text "this</br>issue"
comment:3 follow-up: 4 Changed 11 years ago by
I have tried CKEditor 4.1.2 in every browser and didn't get this issue.
- Please describe in which Operating System and Browser you get this.
- Are you using one of three packages: standard, full, basic or you have created your editor with builder and there are some third-party plugins included?
- Could you send us your build-config.js?
Changed 11 years ago by
comment:4 Changed 11 years ago by
Replying to j.swiderski:
It is straight forward issue in all browser. I am using full version of 4.1.2.
please find the attached config for your reference.
comment:5 follow-up: 6 Changed 11 years ago by
Well in my case issue isn't straight forward.
I have cleared cache in every browser then I have tried your simple TC but no luck. Code test<p>test</p>
wasn't changed.
- I was talking about build-config.js file and not config.js so if possible please attach this one.
- Could you perhaps download full package and try once more? This time please just download editor, drop it on server and try running it on browser (you can clear cache as well). Please try running editor only without your application or custom scripts that might influence this problem.
Changed 11 years ago by
Attachment: | build-config.js added |
---|
comment:6 Changed 11 years ago by
Replying to j.swiderski: Please find the attached build.config.js
issue is not coming if you only set config.enterMode = CKEDITOR.ENTER_BR;
issue comes when you have both mode on config.enterMode = CKEDITOR.ENTER_BR; config.shiftEnterMode = CKEDITOR.ENTER_P;
comment:7 follow-up: 8 Changed 11 years ago by
issue comes when you have both mode on config.enterMode = CKEDITOR.ENTER_BR; config.shiftEnterMode = CKEDITOR.ENTER_P;
I did that.
Could you perhaps check what i have written in last comment:
Could you perhaps download full package and try once more? This time please just download editor, drop it on server and try running it on browser (you can clear cache as well). Please try running editor only without your application or custom scripts that might influence this problem.
comment:8 Changed 11 years ago by
Replying to j.swiderski:
I got the exact case.
If you are use default toolbar then its working fine but if you customize anything then it will not work. just use below code it start giving issues.
<script type="text/javascript"> CKEDITOR.replace( 'txttest', {
toolbar:
[
{ name: 'document', items : [ 'Source' ] }, { name: 'basicstyles', items: [ 'Bold', 'Italic' ] }
]
}); </script>
can you please check and give me any workaround.
Thanks for your help.
comment:9 Changed 11 years ago by
Description: | modified (diff) |
---|---|
Status: | pending → confirmed |
Summary: | In 4.1.2 config.enterMode = CKEDITOR.ENTER_BR; config.shiftEnterMode = CKEDITOR.ENTER_P; <p> tag remove → shiftEnterMode set to CKEDITOR.ENTER_P doesn't report P tag to ACF |
Version: | 4.1.2 → 4.1 |
comment:10 Changed 11 years ago by
@dilip I have managed to reproduce this problem. If possible, please provide all necessary details when reporting bugs.
I have modified your Description. You will find two workarounds there.
comment:11 Changed 11 years ago by
Milestone: | → CKEditor 4.1.3 |
---|
Yes, you're right that shiftEnterMode does not register its required content.
comment:12 Changed 11 years ago by
Owner: | set to Piotrek Koszuliński |
---|---|
Status: | confirmed → assigned |
comment:14 Changed 11 years ago by
Status: | review → review_passed |
---|
comment:15 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with git:c72892f on dev and 07597aef on tests.
Could you describe more precisely what do you mean because I don't understand your request.
Editor doesn't remove P tags when BR mode is used. Please explain in plain step by step scenario what is happening.