Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#16715 closed Bug (duplicate)

CKEDITOR replacing span tags with font tags

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

Description

Steps to reproduce

1. Using the editor (http://nightly.ckeditor.com/16-12-02-07-06/full/samples/); highlight 'Hello World!' text.

2. Change the font of of the highlighted text by using the 'font' dropdown menu

3. Inspect the 'Hello World!' HTML in developer tool and you will see in the HTML the text is wrapped around <span style="font-family:Comic Sans MS,cursive;"> (which is correct)

4. delete the highlighted 'Hello World!' text. Then begin typing again right after deleting the text and you will see in HTML inspector that the span element that was there was replaced with a <font face="Comic Sans MS, cursive"> element. Also you will notice that the font tool does not show the font applied, even when text is highlighted.

Expected result

Actual span tag with styles should be applied like it was initially

Actual result

Font tags are used instead to apply the set styles. This leads to the font tool not indicating the currently set font. Also using deprecated elements is bad.

Other details (browser, OS, CKEditor version, installed plugins)

Change History (5)

comment:1 Changed 8 years ago by Jakub Ś

Keywords: font span removed
Resolution: duplicate
Status: newclosed
Version: 4.6.0

DUP of #13775

There is another issue which can also be worked around with ACF #3786 (it is enough to have ACF turned on in this case).

comment:2 in reply to:  1 Changed 8 years ago by shabssd

Replying to j.swiderski:

DUP of #13775

There is another issue which can also be worked around with ACF #3786 (it is enough to have ACF turned on in this case).

I'm having a hard time implementing the workaround #13775 I'm initiating inline ckeditor on mouseenter of editable text. For some reason I can't get the 'pluginsLoaded' event to trigger; and therefore none of the code

How I'm initiating the inline editor:

$("body [contenteditable]").on("mouseenter", function() {

$(this).ckeditor(function() {

});

});

How would I go about implementing the workaround with this format?

comment:3 Changed 8 years ago by shabssd

This bug should have higher priority. I imagine It's something that happens often and 15 months with no fix is a problem.

comment:4 Changed 8 years ago by Jakub Ś

As exploained in http://dev.ckeditor.com/ticket/13775#comment:5, this is IE native issue not CKEditor issue.

Please try something like:

$(this).ckeditor(function() { 
	on: {
		pluginsLoaded: function( evt ) {
		...
...

comment:5 Changed 8 years ago by shabssd

I'm experiencing this bug in Chrome. It's not only IE. Also I get 'syntax error Unexpected token (' when implementing the above.

Last edited 8 years ago by shabssd (previous) (diff)
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