Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#727·ckeditor5

Ability to set the parent of the editor UI container to something other than body

Author: thedavidmeisterCreated Dec 17, 2017Updated Sep 14, 2026
Labelstype:featuresupport:2

Is this a bug report or feature request? (choose one)

  • Feature request

Version of CKEditor

alpha2

Steps to reproduce

  1. Create an editor with a UI on an element

✅ Expected result

The editor is self contained within or near that element in the DOM and/or ability to pass container element as well as editor element to .create().

❎ Actual result

Half the editor is the modified element and the other half (UI buttons) is unconditionally appended to the root body element.

Other details that might be useful

Some problems this causes/exacerbates:

  • Editor UI does not respect overflow CSS rules of editor element's ancestors (e.g. overflow scroll)
  • Events on the UI bubble straight to the body instead of through the editor elements ancestors (particularly bad for the bubble editor that is visually "inside" the editor)
  • Impossible/difficult to "inspect element" on the UI buttons of the inline/bubble editor as this can cause the editor element to lose focus, which destroys the UI from the DOM. Additionally, if there are multiple editor instances on the page simultaneously it is very difficult to see in the DOM viewer which UIs are associated with which editor elements.
  • Editor UI does not respect CSS z-index of editor element's ancestors

If you'd like to see this feature implemented, add to this post.

Source: ckeditor/ckeditor5

View original on GitHubView discussion on GitHub