Skip to content

Commit f106577

Browse files
committed
feat: show a link icon in the hyperlink editor
1 parent 2ec9f7d commit f106577

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1809,9 +1809,26 @@ function RemoteFunctions(config = {}) {
18091809
max-width: 400px;
18101810
box-sizing: border-box;
18111811
padding: 7px 14px !important;
1812+
display: flex !important;
1813+
align-items: center !important;
1814+
gap: 8px !important;
1815+
}
1816+
.link-icon {
1817+
display: flex !important;
1818+
align-items: center !important;
1819+
justify-content: center !important;
1820+
flex-shrink: 0 !important;
1821+
width: 16px !important;
1822+
height: 16px !important;
1823+
color: #cdcdcd !important;
1824+
}
1825+
.link-icon svg {
1826+
width: 16px !important;
1827+
height: 16px !important;
1828+
display: block !important;
18121829
}
18131830
input {
1814-
width: 100%;
1831+
flex: 1 !important;
18151832
border: none;
18161833
outline: none;
18171834
font-size: 14px !important;
@@ -1824,7 +1841,10 @@ function RemoteFunctions(config = {}) {
18241841
}
18251842
</style>
18261843
<div class="hyperlink-input-box">
1827-
<input type="text" value="${currentHref}" placeholder="https://example.com" spellcheck="false" />
1844+
<div class="link-icon" title="${currentHref.trim() || config.strings.hyperlinkNoHref}">
1845+
${ICONS.link}
1846+
</div>
1847+
<input type="text" value="${currentHref.trim()}" placeholder="https://example.com" spellcheck="false" />
18281848
</div>
18291849
`;
18301850

src/LiveDevelopment/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ define(function main(require, exports, module) {
107107
selectParent: Strings.LIVE_DEV_MORE_OPTIONS_SELECT_PARENT,
108108
editText: Strings.LIVE_DEV_MORE_OPTIONS_EDIT_TEXT,
109109
editHyperlink: Strings.LIVE_DEV_MORE_OPTIONS_EDIT_HYPERLINK,
110+
hyperlinkNoHref: Strings.LIVE_DEV_HYPERLINK_NO_HREF,
110111
duplicate: Strings.LIVE_DEV_MORE_OPTIONS_DUPLICATE,
111112
delete: Strings.LIVE_DEV_MORE_OPTIONS_DELETE,
112113
ai: Strings.LIVE_DEV_MORE_OPTIONS_AI,

src/nls/root/strings.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ define({
188188
"LIVE_DEV_MORE_OPTIONS_SELECT_PARENT": "Select Parent",
189189
"LIVE_DEV_MORE_OPTIONS_EDIT_TEXT": "Edit Text",
190190
"LIVE_DEV_MORE_OPTIONS_EDIT_HYPERLINK": "Edit Hyperlink",
191+
"LIVE_DEV_HYPERLINK_NO_HREF": "No href set",
191192
"LIVE_DEV_MORE_OPTIONS_DUPLICATE": "Duplicate",
192193
"LIVE_DEV_MORE_OPTIONS_DELETE": "Delete",
193194
"LIVE_DEV_MORE_OPTIONS_AI": "Edit with AI",

0 commit comments

Comments
 (0)