- Issue created by @franknoel
- 🇺🇸United States pingevt
Not sure how supported this is but if you're looking into this, in `idattributesui.js` in the plugin, in the `_showForm()` method, just needs a better selector for the target. Right now it is only using a queryselector on a class, so it will always be the first one on the page.
I'm not a CKEditor plugin writer or anything but, I changed it to this, based on another plugin I was looking at. Places the label in the element you are adding the id to.
const view = this.editor.editing.view; const viewDocument = view.document; let target = null; // Set a target position by converting view selection range to DOM. target = () => view.domConverter.viewRangeToDom( viewDocument.selection.getFirstRange() );
Patch to make balloon pop up position more specific to the button clicked
- Merge request !1Made _showForm balloon position more specific to the button clicked → (Closed) created by awearring
Updated patch after latest code updates
included changes to src files too- Status changed to RTBC
about 1 year ago 11:42am 30 April 2024 - 🇧🇪Belgium dieterholvoet Brussels
The latest patch/MR fixes the issue for me.
Wouldn´t it be the easiest solution to just use the current ckeditor-container instead of the whole document to search for our button?
const target = editor.ui.view.element.querySelector( '.element-add-attributes-btn' );
- 🇧🇪Belgium dieterholvoet Brussels
I tested that and yes, that works too! Thanks for the suggestion.
- 🇧🇪Belgium dieterholvoet Brussels
dieterholvoet → changed the visibility of the branch 3391771-balloon-panel-is-misplaced to hidden.
-
dieterholvoet →
committed f808e9d4 on 1.0.x
Issue #3391771 by awearring, dieterholvoet, franknoel, pingevt, xbakl:...
-
dieterholvoet →
committed f808e9d4 on 1.0.x