Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#6215 closed Bug (fixed)

copied bold content not editable

Reported by: yiminghe Owned by: Sa'ar Zac Elias
Priority: Normal Milestone: CKEditor 3.5.3
Component: Core : Styles Version: 3.4
Keywords: Cc:

Description (last modified by Krzysztof Studnik)

if user copy content from web somewhere to ckeditor ,the html code is

<span style="font-weight: bold;">bold</span>

the editor's bold button (alway off state) is unusable for copied content.

and if i change coreStyles_bold in _source\plugins\basicstyles\plugin.js line 54 to

{ element        : 'span',
                styles        : { 'font-weight' : 'bold' },
                overrides    : [
                    { element : 'b' },
                    { strong : 'strong' },
                ] };

when user copy

<b>bold</b>

to sourcearea ,and place cursor in the middle of bold (do not select a character) at wysiwyg mode ,the bold button's state is on,but if clicked ,nothing happened

i modified code file (ckeditor 3.4) : _source/plugins/styles/plugin.js line 603

from

removeFromElement( this, element );

to

if ( element.getName() == this.element )
						removeFromElement( this, element );
					else
						removeOverrides( element, getOverrides( this )[ element.getName() ] );

problem solved ,hope helpful

Attachments (1)

6215.patch (574 bytes) - added by Sa'ar Zac Elias 7 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 7 years ago by Krzysztof Studnik

Description: modified (diff)
Keywords: HasPatch added
Owner: set to Krzysztof Studnik
Status: newreview

After both changes has been made,

<span style="font-weight: bold;">bold</span>
<b>bold</b>

It is possible to switch style between bold and normal.

Checked on 3.4.1 SVN

comment:2 Changed 7 years ago by Krzysztof Studnik

Status: reviewreview_passed

comment:3 Changed 7 years ago by Wiktor Walc

Milestone: CKEditor 3.5.2
Owner: Krzysztof Studnik deleted
Status: review_passednew

@krst - please attach a correct patch and change the status to review if you'd like to take the ownership of this ticket (the same developer cannot change the status to review and review_passed)

Changed 7 years ago by Sa'ar Zac Elias

Attachment: 6215.patch added

comment:4 Changed 7 years ago by Sa'ar Zac Elias

Owner: set to Sa'ar Zac Elias
Status: newreview

comment:5 Changed 7 years ago by Garry Yao

Keywords: HasPatch removed
Status: reviewreview_passed

comment:6 Changed 7 years ago by Sa'ar Zac Elias

Resolution: fixed
Status: review_passedclosed

Fixed with [6415].

comment:7 Changed 6 years ago by Krzysztof Studnik

#705 is a DUP

Last edited 6 years ago by Krzysztof Studnik (previous) (diff)
Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy