-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
32 lines (28 loc) · 1.79 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Markdown Image Remover</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<h1>Markdown Image Remover</h1>
<p>Paste your Markdown text below, then click "Remove images" to strip out the inline <code>![][imageX]</code> references and <code>[imageX]: ...</code> lines.</p>
<div class="container">
<textarea id="inputText" rows="15" placeholder="Paste your Markdown here..."></textarea>
<div class="button-row">
<button id="removeImagesBtn">Remove images</button>
<!-- New button to copy text -->
<button id="copyToClipboardBtn">Copy to clipboard</button>
</div>
<textarea id="outputText" rows="15" placeholder="Result will appear here..." readonly></textarea>
</div>
<!-- Description section at the bottom of the page -->
<div class="description">
<p><strong>What does this do?</strong> This tool scans your Markdown text using JavaScript regex patterns to remove any lines that define image data (e.g., <code>[image1]: ...</code>) and all inline references of the form <code>![][imageX]</code>.</p>
<p><strong>Why does this exist?</strong> I found that when I use <a href="https://support.google.com/docs/answer/12014036?hl=en#zippy=%2Ccopy-google-docs-content-as-markdown">Copy as Markdown in Google Docs</a> there is a lot of image text at the end of the document, and this image text makes processing the clipboard contents harder for AI / LLMs like ChatGPT. So, I made this little utility to strip out the image text.</p>
<p>Created by <a href="https://nels.city/" target="_blank" rel="noopener noreferrer">Nels Nelson</a>, code available on <a href="https://github.com/nelscity/md-image-remover">Github</a>.</p>
</div>
<script src="script.js"></script>
</body>
</html>