Opened 8 years ago

Closed 8 years ago

#16623 closed Bug (invalid)

Contents in source modal window diappears

Reported by: Yogesh Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

We are using CKEditor 4.5.11, this issue happens in chrome browser only. In CK on Source modal window paste content like below:

<style type="text/css">.button { background: Silver; border: 2px solid rgba(33, 68, 72, 0.59); color: rgba(0, 0, 0, 0.55); padding : 5px 5px 5px 5px;

}

.buttonOff { background: Silver; border: 2px solid rgba(33, 68, 72, 0.59); color: rgba(0, 0, 0, 0.55); } .buttonOff:hover {

background: #1cafd9;

} #mid{ height: 350px; overflow-y: auto; } .mid{ align:left; } .imgcol{ width: 6%; } table{ width:100; } .txtcol{ width: 10.5%;font-family: 'Segoe UI' , Tahoma, Geneva, Verdana, sans-serif; font-size: 10px; } </style>

When we again go to Source modal window contents in modal window disappears.

Change History (1)

comment:1 Changed 8 years ago by Jakub Ś

Resolution: invalid
Status: newclosed
Version: 4.5.11

When you are running default mode you only have body available. The content area where you can enter content is actually a body. Now, you can either use http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-fullPage and set your styles in head section or you can extend ACF:

var editor = CKEDITOR.replace( 'editor1', {				
	extraAllowedContent : 'style[*]'
});

Please note however that is second case HTML with style tags in body will not be valid. You can test this with https://html5.validator.nu/ or you can simply check out the spec which says style element is only allowed where metadata content is allowed.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy