<!-- Adjusted Main App Name Input Width -->
<style>
/* Adjust the width to prevent overlapping */
#app-name-input {
width: calc(100% - 150px); /* Adjust this value as needed */
}
</style>
<!-- Fix for Send Image Button -->
<!-- Ensure the image source is correct and the image tag is properly closed -->
<button id="send-button">
<img src="path/to/send-image.png" alt="Send" />
</button>
<!-- Menu with Focus and Icon Buttons for Format Functions -->
<!-- Include icons for Bold, Italic, and Underline -->
<style>
/* Styles for icon buttons */
.format-button {
background: none;
border: none;
cursor: pointer;
}
.format-button:focus {
outline: 2px solid #00f;
}
</style>
<!-- Format and Functionality Icons -->
<div id="format-toolbar">
<button class="format-button" onclick="document.execCommand('bold', false, null)">
<img src="path/to/bold-icon.png" alt="Bold" />
</button>
<button class="format-button" onclick="document.execCommand('italic', false, null)">
<img src="path/to/italic-icon.png" alt="Italic" />
</button>
<button class="format-button" onclick="document.execCommand('underline', false, null)">
<img src="path/to/underline-icon.png" alt="Underline" />
</button>
</div>
<!-- Edit Menu -->
<style>
/* Styles for the menu */
.menu {
position: relative;
display: inline-block;
}
.menu-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 80px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
.menu-content button {
color: black;
padding: 8px 12px;
text-decoration: none;
display: block;
background: none;
border: none;
width: 100%;
text-align: left;
}
.menu-content button:hover {
background-color: #f1f1f1;
}
.menu:focus .menu-content {
display: block;
}
</style>
<div class="menu" tabindex="0">
Edit
<div class="menu-content">
<button onclick="document.execCommand('cut', false, null)">Cut</button>
<button onclick="document.execCommand('copy', false, null)">Copy</button>
<button onclick="document.execCommand('paste', false, null)">Paste</button>
</div>
</div>
<!-- Ensure Selected Text is Affected -->
<script>
// Ensure the menu actions affect the selected text
document.querySelectorAll('.menu-content button, .format-button').forEach(button => {
button.addEventListener('click', () => {
// Focus back on the editable area after menu action
document.getElementById('editable-area').focus();
});
});
</script>
<!-- Editable Text Area -->
<div id="editable-area" contenteditable="true" style="border: 1px solid #ccc; padding: 10px;">
Your text here...
</div>