Check if closest LI-element is within editor.#3
Check if closest LI-element is within editor.#3Jeffrey-Zutt wants to merge 2 commits intoRedactor2:masterfrom Jeffrey-Zutt:master
Conversation
|
Using Your proposed change first searches the closest list item and then checks if it is contained within Redactor (hint: there is also |
|
Ah, your way is more efficient indeed! I've changed it into Let me know what you think! |
|
My bad, it's been a while I used |
|
No worries ;-) |
We have multiple redactor-editors on one page, and some (or all) of them are placed within a LI tag.
Whenever the user tries to add a table, the table is placed after the closing LI tag, and thus outside the editor.
The change makes the plugin check if the closest LI tag is within the editor.
If so, it places the table after it. If not, it places the table where the cursor is.