Preserve empty inline elements #17524
Labels
resolution:resolved
This issue was already resolved (e.g. by another ticket).
type:bug
This issue reports a buggy (incorrect) behavior.
📝 Provide detailed reproduction steps (if any)
CKEditor4 uses an empty anchor element as the destination for a document/bookmark link. CKEditor5 removes the empty anchor element.
✔️ Expected result
Preserve the empty anchor element
❌ Actual result
The empty anchor element is removed.
📃 Other details
This appeared to be fixed in Issue#: 9888 but seems to be broken again.
I was able to duplicate this in the "Source code editing and HTML support" demo.
I also tried this using an empty span tag and had the same results so I assume this applies to all empty inline elements that have opening/closing tags.
import {
ClassicEditor,
AccessibilityHelp,
Alignment,
Autoformat,
AutoImage,
AutoLink,
Autosave,
BlockQuote,
Bold,
CloudServices,
Code,
CodeBlock,
Essentials,
FindAndReplace,
FontBackgroundColor,
FontColor,
FontFamily,
FontSize,
GeneralHtmlSupport,
Heading,
Highlight,
HorizontalLine,
HtmlComment,
HtmlEmbed,
ImageBlock,
ImageCaption,
ImageInline,
ImageInsertViaUrl,
ImageResize,
ImageStyle,
ImageTextAlternative,
ImageToolbar,
ImageUpload,
Indent,
IndentBlock,
Italic,
Link,
LinkImage,
List,
ListProperties,
MediaEmbed,
PageBreak,
Paragraph,
PasteFromOffice,
RemoveFormat,
SelectAll,
ShowBlocks,
SourceEditing,
SpecialCharacters,
SpecialCharactersArrows,
SpecialCharactersCurrency,
SpecialCharactersEssentials,
SpecialCharactersLatin,
SpecialCharactersMathematical,
SpecialCharactersText,
Strikethrough,
Style,
Subscript,
Superscript,
Table,
TableCaption,
TableCellProperties,
TableColumnResize,
TableProperties,
TableToolbar,
TextPartLanguage,
TextTransformation,
// Title,
Underline,
Undo
} from 'ckeditor5';
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: