This commit is contained in:
Markos Gogoulos
2026-02-10 22:33:41 +02:00
parent 467e273ff5
commit 98111234f8
7 changed files with 38 additions and 39 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -75,11 +75,8 @@ const setupIframeOverlays = (editor, handleIframeAction) => {
editBtn.className = 'tiny-mediacms-edit-btn'; editBtn.className = 'tiny-mediacms-edit-btn';
editBtn.setAttribute('type', 'button'); editBtn.setAttribute('type', 'button');
editBtn.setAttribute('title', 'Edit video embed options'); editBtn.setAttribute('title', 'Edit video embed options');
// Use clean inline SVG to avoid TinyMCE wrapper issues // Use text "EDIT" instead of icon
editBtn.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">' + editBtn.textContent = 'EDIT';
'<circle cx="50" cy="50" r="48" fill="#2EAF5A"/>' +
'<polygon points="38,28 38,72 75,50" fill="#FFFFFF"/>' +
'</svg>';
// Wrap the iframe: insert wrapper, move iframe into it, add button // Wrap the iframe: insert wrapper, move iframe into it, add button
iframe.parentNode.insertBefore(wrapper, iframe); iframe.parentNode.insertBefore(wrapper, iframe);
@@ -116,32 +113,28 @@ const setupIframeOverlays = (editor, handleIframeAction) => {
} }
.tiny-mediacms-edit-btn { .tiny-mediacms-edit-btn {
position: absolute; position: absolute;
top: 48px; top: 5px;
left: 6px; left: 50%;
width: 28px; transform: translateX(-50%);
height: 28px; background: rgba(0, 0, 0, 0.7);
background: #ffffff; color: #ffffff;
border: none; border: none;
border-radius: 50%; border-radius: 3px;
cursor: pointer; cursor: pointer;
z-index: 10; z-index: 10;
padding: 0; padding: 4px 12px;
margin: 0; margin: 0;
box-shadow: 0 2px 6px rgba(0,0,0,0.35); font-size: 12px;
transition: transform 0.15s, box-shadow 0.15s; font-weight: bold;
display: flex; text-decoration: none;
align-items: center; box-shadow: 0 2px 4px rgba(0,0,0,0.3);
justify-content: center; transition: background 0.15s, box-shadow 0.15s;
display: inline-block;
box-sizing: border-box; box-sizing: border-box;
} }
.tiny-mediacms-edit-btn:hover { .tiny-mediacms-edit-btn:hover {
transform: scale(1.15); background: rgba(0, 0, 0, 0.85);
box-shadow: 0 3px 10px rgba(0,0,0,0.45); box-shadow: 0 3px 6px rgba(0,0,0,0.4);
}
.tiny-mediacms-edit-btn svg {
width: 18px !important;
height: 18px !important;
display: block !important;
} }
`; `;
editorDoc.head.appendChild(style); editorDoc.head.appendChild(style);

View File

@@ -711,6 +711,7 @@ export default class IframeEmbed {
const urlTabBtn = form.querySelector( const urlTabBtn = form.querySelector(
Selectors.IFRAME.elements.tabUrlBtn, Selectors.IFRAME.elements.tabUrlBtn,
); );
const urlTabItem = form.querySelector('.tiny_iframecms_tab_url_item');
const iframeLibraryTabBtn = form.querySelector( const iframeLibraryTabBtn = form.querySelector(
Selectors.IFRAME.elements.tabIframeLibraryBtn, Selectors.IFRAME.elements.tabIframeLibraryBtn,
); );
@@ -721,6 +722,11 @@ export default class IframeEmbed {
Selectors.IFRAME.elements.paneIframeLibrary, Selectors.IFRAME.elements.paneIframeLibrary,
); );
// Show the Configure tab
if (urlTabItem) {
urlTabItem.style.display = '';
}
// Update tab button states // Update tab button states
if (urlTabBtn) { if (urlTabBtn) {
urlTabBtn.classList.add('active'); urlTabBtn.classList.add('active');
@@ -752,6 +758,7 @@ export default class IframeEmbed {
const urlTabBtn = form.querySelector( const urlTabBtn = form.querySelector(
Selectors.IFRAME.elements.tabUrlBtn, Selectors.IFRAME.elements.tabUrlBtn,
); );
const urlTabItem = form.querySelector('.tiny_iframecms_tab_url_item');
const iframeLibraryTabBtn = form.querySelector( const iframeLibraryTabBtn = form.querySelector(
Selectors.IFRAME.elements.tabIframeLibraryBtn, Selectors.IFRAME.elements.tabIframeLibraryBtn,
); );
@@ -762,6 +769,11 @@ export default class IframeEmbed {
Selectors.IFRAME.elements.paneIframeLibrary, Selectors.IFRAME.elements.paneIframeLibrary,
); );
// Hide the Configure tab when switching to My Media
if (urlTabItem) {
urlTabItem.style.display = 'none';
}
// Update tab button states // Update tab button states
if (urlTabBtn) { if (urlTabBtn) {
urlTabBtn.classList.remove('active'); urlTabBtn.classList.remove('active');

View File

@@ -992,12 +992,6 @@ export default class IframeEmbed {
*/ */
handleIframeLibraryMessage(root, event) { handleIframeLibraryMessage(root, event) {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.log(
'handleIframeLibraryMessage received:',
event.data,
'from origin:',
event.origin,
);
const data = event.data; const data = event.data;