@jjlmoya/utils-social 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +60 -0
- package/src/category/i18n/en.ts +23 -0
- package/src/category/i18n/es.ts +23 -0
- package/src/category/i18n/fr.ts +23 -0
- package/src/category/index.ts +13 -0
- package/src/category/seo.astro +15 -0
- package/src/components/PreviewNavSidebar.astro +116 -0
- package/src/components/PreviewToolbar.astro +143 -0
- package/src/data.ts +11 -0
- package/src/env.d.ts +5 -0
- package/src/index.ts +27 -0
- package/src/layouts/PreviewLayout.astro +117 -0
- package/src/pages/[locale]/[slug].astro +146 -0
- package/src/pages/[locale].astro +251 -0
- package/src/pages/index.astro +4 -0
- package/src/tests/faq_count.test.ts +19 -0
- package/src/tests/locale_completeness.test.ts +42 -0
- package/src/tests/mocks/astro_mock.js +2 -0
- package/src/tests/no_h1_in_components.test.ts +48 -0
- package/src/tests/seo_length.test.ts +22 -0
- package/src/tests/tool_validation.test.ts +17 -0
- package/src/tool/redditFormatter/bibliography.astro +14 -0
- package/src/tool/redditFormatter/component.astro +246 -0
- package/src/tool/redditFormatter/i18n/en.ts +193 -0
- package/src/tool/redditFormatter/i18n/es.ts +193 -0
- package/src/tool/redditFormatter/i18n/fr.ts +193 -0
- package/src/tool/redditFormatter/index.ts +34 -0
- package/src/tool/redditFormatter/logic.ts +24 -0
- package/src/tool/redditFormatter/seo.astro +14 -0
- package/src/tool/redditFormatter/ui.ts +13 -0
- package/src/tool/safeZones/bibliography.astro +14 -0
- package/src/tool/safeZones/component.astro +857 -0
- package/src/tool/safeZones/i18n/en.ts +244 -0
- package/src/tool/safeZones/i18n/es.ts +244 -0
- package/src/tool/safeZones/i18n/fr.ts +244 -0
- package/src/tool/safeZones/index.ts +34 -0
- package/src/tool/safeZones/logic.ts +137 -0
- package/src/tool/safeZones/seo.astro +14 -0
- package/src/tool/safeZones/ui.ts +34 -0
- package/src/tool/socialImageResizer/bibliography.astro +14 -0
- package/src/tool/socialImageResizer/component.astro +498 -0
- package/src/tool/socialImageResizer/i18n/en.ts +211 -0
- package/src/tool/socialImageResizer/i18n/es.ts +211 -0
- package/src/tool/socialImageResizer/i18n/fr.ts +211 -0
- package/src/tool/socialImageResizer/index.ts +34 -0
- package/src/tool/socialImageResizer/logic.ts +133 -0
- package/src/tool/socialImageResizer/seo.astro +14 -0
- package/src/tool/socialImageResizer/ui.ts +7 -0
- package/src/tool/socialValueCalculator/bibliography.astro +14 -0
- package/src/tool/socialValueCalculator/component.astro +829 -0
- package/src/tool/socialValueCalculator/i18n/en.ts +310 -0
- package/src/tool/socialValueCalculator/i18n/es.ts +310 -0
- package/src/tool/socialValueCalculator/i18n/fr.ts +310 -0
- package/src/tool/socialValueCalculator/index.ts +34 -0
- package/src/tool/socialValueCalculator/logic.ts +60 -0
- package/src/tool/socialValueCalculator/seo.astro +14 -0
- package/src/tool/socialValueCalculator/ui.ts +31 -0
- package/src/tool/tinderPhotoOptimizer/bibliography.astro +14 -0
- package/src/tool/tinderPhotoOptimizer/component.astro +1514 -0
- package/src/tool/tinderPhotoOptimizer/i18n/en.ts +248 -0
- package/src/tool/tinderPhotoOptimizer/i18n/es.ts +248 -0
- package/src/tool/tinderPhotoOptimizer/i18n/fr.ts +248 -0
- package/src/tool/tinderPhotoOptimizer/index.ts +34 -0
- package/src/tool/tinderPhotoOptimizer/logic.ts +199 -0
- package/src/tool/tinderPhotoOptimizer/seo.astro +14 -0
- package/src/tool/tinderPhotoOptimizer/ui.ts +37 -0
- package/src/tool/youtubeThumbnail/bibliography.astro +14 -0
- package/src/tool/youtubeThumbnail/component.astro +419 -0
- package/src/tool/youtubeThumbnail/i18n/en.ts +207 -0
- package/src/tool/youtubeThumbnail/i18n/es.ts +207 -0
- package/src/tool/youtubeThumbnail/i18n/fr.ts +207 -0
- package/src/tool/youtubeThumbnail/index.ts +34 -0
- package/src/tool/youtubeThumbnail/logic.ts +7 -0
- package/src/tool/youtubeThumbnail/seo.astro +14 -0
- package/src/tool/youtubeThumbnail/ui.ts +13 -0
- package/src/tool/youtubeThumbnailPreviewer/bibliography.astro +14 -0
- package/src/tool/youtubeThumbnailPreviewer/component.astro +791 -0
- package/src/tool/youtubeThumbnailPreviewer/i18n/en.ts +321 -0
- package/src/tool/youtubeThumbnailPreviewer/i18n/es.ts +321 -0
- package/src/tool/youtubeThumbnailPreviewer/i18n/fr.ts +321 -0
- package/src/tool/youtubeThumbnailPreviewer/index.ts +34 -0
- package/src/tool/youtubeThumbnailPreviewer/seo.astro +14 -0
- package/src/tool/youtubeThumbnailPreviewer/ui.ts +19 -0
- package/src/tools.ts +10 -0
- package/src/types.ts +72 -0
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { KnownLocale } from '../../types';
|
|
3
|
+
import type { RedditFormatterUI } from './ui';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
locale?: KnownLocale;
|
|
7
|
+
ui?: Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { ui } = Astro.props;
|
|
11
|
+
const t = (ui ?? {}) as RedditFormatterUI;
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<div
|
|
15
|
+
class="rdf-root"
|
|
16
|
+
data-copy-label={t.btnCopy}
|
|
17
|
+
data-copied-label={t.btnCopied}
|
|
18
|
+
>
|
|
19
|
+
<div class="rdf-grid">
|
|
20
|
+
<div class="rdf-panel">
|
|
21
|
+
<label for="rdf-input" class="rdf-label">{t.labelInput}</label>
|
|
22
|
+
<textarea id="rdf-input" class="rdf-textarea" placeholder={t.placeholderInput}></textarea>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div class="rdf-controls">
|
|
26
|
+
<span class="rdf-label">{t.labelOptions}</span>
|
|
27
|
+
<div class="rdf-checkbox-group">
|
|
28
|
+
<label class="rdf-checkbox-label">
|
|
29
|
+
<input type="checkbox" id="rdf-fix-paragraphs" checked />
|
|
30
|
+
<span>{t.optionParagraphs}</span>
|
|
31
|
+
</label>
|
|
32
|
+
<label class="rdf-checkbox-label">
|
|
33
|
+
<input type="checkbox" id="rdf-remove-spaces" checked />
|
|
34
|
+
<span>{t.optionSpaces}</span>
|
|
35
|
+
</label>
|
|
36
|
+
<label class="rdf-checkbox-label">
|
|
37
|
+
<input type="checkbox" id="rdf-remove-invisible" checked />
|
|
38
|
+
<span>{t.optionInvisible}</span>
|
|
39
|
+
</label>
|
|
40
|
+
<label class="rdf-checkbox-label">
|
|
41
|
+
<input type="checkbox" id="rdf-remove-links" />
|
|
42
|
+
<span>{t.optionLinks}</span>
|
|
43
|
+
</label>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div class="rdf-panel">
|
|
48
|
+
<div class="rdf-output-header">
|
|
49
|
+
<label for="rdf-output" class="rdf-label">{t.labelOutput}</label>
|
|
50
|
+
<button id="rdf-copy-btn" class="rdf-copy-btn">{t.btnCopy}</button>
|
|
51
|
+
</div>
|
|
52
|
+
<textarea id="rdf-output" class="rdf-textarea" readonly placeholder={t.placeholderOutput}></textarea>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<script>
|
|
58
|
+
import { processText } from './logic';
|
|
59
|
+
|
|
60
|
+
let inputEl: HTMLTextAreaElement | null = null;
|
|
61
|
+
let outputEl: HTMLTextAreaElement | null = null;
|
|
62
|
+
let checkParagraphs: HTMLInputElement | null = null;
|
|
63
|
+
let checkSpaces: HTMLInputElement | null = null;
|
|
64
|
+
let checkInvisible: HTMLInputElement | null = null;
|
|
65
|
+
let checkLinks: HTMLInputElement | null = null;
|
|
66
|
+
|
|
67
|
+
function isChecked(el: HTMLInputElement | null, def: boolean): boolean {
|
|
68
|
+
return el ? el.checked : def;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function getOptions() {
|
|
72
|
+
return {
|
|
73
|
+
fixParagraphs: isChecked(checkParagraphs, true),
|
|
74
|
+
removeSpaces: isChecked(checkSpaces, true),
|
|
75
|
+
removeInvisible: isChecked(checkInvisible, true),
|
|
76
|
+
removeLinks: isChecked(checkLinks, false),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function run() {
|
|
81
|
+
if (!inputEl || !outputEl) return;
|
|
82
|
+
outputEl.value = processText(inputEl.value, getOptions());
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function setupCopy(copyBtn: HTMLButtonElement | null, copyLabel: string, copiedLabel: string) {
|
|
86
|
+
copyBtn?.addEventListener('click', () => {
|
|
87
|
+
if (!outputEl?.value) return;
|
|
88
|
+
navigator.clipboard.writeText(outputEl.value).then(() => {
|
|
89
|
+
if (!copyBtn) return;
|
|
90
|
+
copyBtn.textContent = copiedLabel;
|
|
91
|
+
setTimeout(() => { copyBtn.textContent = copyLabel; }, 2000);
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function init() {
|
|
97
|
+
const root = document.querySelector('.rdf-root') as HTMLElement | null;
|
|
98
|
+
if (!root) return;
|
|
99
|
+
const copyLabel = root.dataset.copyLabel ?? 'Copy';
|
|
100
|
+
const copiedLabel = root.dataset.copiedLabel ?? 'Copied';
|
|
101
|
+
inputEl = document.getElementById('rdf-input') as HTMLTextAreaElement | null;
|
|
102
|
+
outputEl = document.getElementById('rdf-output') as HTMLTextAreaElement | null;
|
|
103
|
+
const copyBtn = document.getElementById('rdf-copy-btn') as HTMLButtonElement | null;
|
|
104
|
+
checkParagraphs = document.getElementById('rdf-fix-paragraphs') as HTMLInputElement | null;
|
|
105
|
+
checkSpaces = document.getElementById('rdf-remove-spaces') as HTMLInputElement | null;
|
|
106
|
+
checkInvisible = document.getElementById('rdf-remove-invisible') as HTMLInputElement | null;
|
|
107
|
+
checkLinks = document.getElementById('rdf-remove-links') as HTMLInputElement | null;
|
|
108
|
+
[inputEl, checkParagraphs, checkSpaces, checkInvisible, checkLinks].forEach((el) => {
|
|
109
|
+
el?.addEventListener('input', run);
|
|
110
|
+
el?.addEventListener('change', run);
|
|
111
|
+
});
|
|
112
|
+
setupCopy(copyBtn, copyLabel, copiedLabel);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
document.addEventListener('astro:page-load', init);
|
|
116
|
+
init();
|
|
117
|
+
</script>
|
|
118
|
+
|
|
119
|
+
<style>
|
|
120
|
+
.rdf-root {
|
|
121
|
+
--bg: rgba(255, 255, 255, 0.4);
|
|
122
|
+
--border: rgba(255, 255, 255, 0.6);
|
|
123
|
+
--label: #334155;
|
|
124
|
+
--textarea-bg: #fff;
|
|
125
|
+
--textarea-border: #ddd;
|
|
126
|
+
--textarea-text: #111;
|
|
127
|
+
--controls-bg: rgba(255, 255, 255, 0.7);
|
|
128
|
+
--controls-border: #eaeaea;
|
|
129
|
+
--checkbox-color: #444;
|
|
130
|
+
|
|
131
|
+
padding: 2rem;
|
|
132
|
+
background: var(--bg);
|
|
133
|
+
backdrop-filter: blur(12px);
|
|
134
|
+
-webkit-backdrop-filter: blur(12px);
|
|
135
|
+
border-radius: 16px;
|
|
136
|
+
border: 1px solid var(--border);
|
|
137
|
+
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
:global(.theme-dark) .rdf-root {
|
|
141
|
+
--bg: rgba(15, 23, 42, 0.6);
|
|
142
|
+
--border: rgba(255, 255, 255, 0.08);
|
|
143
|
+
--label: #94a3b8;
|
|
144
|
+
--textarea-bg: #0f172a;
|
|
145
|
+
--textarea-border: rgba(255, 255, 255, 0.1);
|
|
146
|
+
--textarea-text: #f1f5f9;
|
|
147
|
+
--controls-bg: rgba(255, 255, 255, 0.03);
|
|
148
|
+
--controls-border: rgba(255, 255, 255, 0.08);
|
|
149
|
+
--checkbox-color: #94a3b8;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.rdf-grid {
|
|
153
|
+
display: flex;
|
|
154
|
+
flex-direction: column;
|
|
155
|
+
gap: 1.5rem;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.rdf-panel {
|
|
159
|
+
display: flex;
|
|
160
|
+
flex-direction: column;
|
|
161
|
+
gap: 0.5rem;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.rdf-label {
|
|
165
|
+
font-weight: 600;
|
|
166
|
+
color: var(--label);
|
|
167
|
+
font-size: 0.95rem;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.rdf-textarea {
|
|
171
|
+
width: 100%;
|
|
172
|
+
min-height: 220px;
|
|
173
|
+
padding: 1rem;
|
|
174
|
+
border-radius: 8px;
|
|
175
|
+
border: 1px solid var(--textarea-border);
|
|
176
|
+
background: var(--textarea-bg);
|
|
177
|
+
font-size: 1rem;
|
|
178
|
+
color: var(--textarea-text);
|
|
179
|
+
resize: vertical;
|
|
180
|
+
transition: border-color 0.2s;
|
|
181
|
+
line-height: 1.6;
|
|
182
|
+
box-sizing: border-box;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.rdf-textarea:focus {
|
|
186
|
+
outline: none;
|
|
187
|
+
border-color: #ff4500;
|
|
188
|
+
box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.1);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.rdf-controls {
|
|
192
|
+
display: flex;
|
|
193
|
+
flex-direction: column;
|
|
194
|
+
gap: 0.75rem;
|
|
195
|
+
background: var(--controls-bg);
|
|
196
|
+
padding: 1.5rem;
|
|
197
|
+
border-radius: 8px;
|
|
198
|
+
border: 1px solid var(--controls-border);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.rdf-checkbox-group {
|
|
202
|
+
display: grid;
|
|
203
|
+
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
|
|
204
|
+
gap: 0.75rem;
|
|
205
|
+
margin-top: 0.25rem;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.rdf-checkbox-label {
|
|
209
|
+
display: flex;
|
|
210
|
+
align-items: center;
|
|
211
|
+
gap: 0.75rem;
|
|
212
|
+
cursor: pointer;
|
|
213
|
+
font-size: 0.95rem;
|
|
214
|
+
color: var(--checkbox-color);
|
|
215
|
+
font-weight: 500;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.rdf-checkbox-label input[type='checkbox'] {
|
|
219
|
+
width: 1.25rem;
|
|
220
|
+
height: 1.25rem;
|
|
221
|
+
accent-color: #ff4500;
|
|
222
|
+
cursor: pointer;
|
|
223
|
+
flex-shrink: 0;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.rdf-output-header {
|
|
227
|
+
display: flex;
|
|
228
|
+
justify-content: space-between;
|
|
229
|
+
align-items: center;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.rdf-copy-btn {
|
|
233
|
+
background: #ff4500;
|
|
234
|
+
color: #fff;
|
|
235
|
+
border: none;
|
|
236
|
+
padding: 0.6rem 1.25rem;
|
|
237
|
+
border-radius: 6px;
|
|
238
|
+
font-weight: 600;
|
|
239
|
+
font-size: 0.9rem;
|
|
240
|
+
cursor: pointer;
|
|
241
|
+
transition: background-color 0.2s, transform 0.1s;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.rdf-copy-btn:hover { background: #e03d00; }
|
|
245
|
+
.rdf-copy-btn:active { transform: scale(0.97); }
|
|
246
|
+
</style>
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
3
|
+
import type { RedditFormatterUI } from '../ui';
|
|
4
|
+
|
|
5
|
+
const slug = 'reddit-text-formatter';
|
|
6
|
+
const title = 'Reddit Text Formatter - Cleaner and Markdown Fixer';
|
|
7
|
+
const description =
|
|
8
|
+
'Advanced text cleaner for posting on Reddit. Fixes missing line breaks, removes multiple spaces and hidden characters that break Markdown.';
|
|
9
|
+
|
|
10
|
+
const faqData = [
|
|
11
|
+
{
|
|
12
|
+
question: 'Why does my text on Reddit lose its line breaks?',
|
|
13
|
+
answer:
|
|
14
|
+
'Reddit uses Markdown, which requires you to press double space at the end of a line before pressing Enter for a normal line break, or press Enter twice to create a new paragraph. Our tool handles this automatically by inserting double line breaks.',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
question: 'What are hidden or invisible characters?',
|
|
18
|
+
answer:
|
|
19
|
+
'When copying from complex word processors, zero-width formatting markers often get attached. These elements are invisible on normal web pages but can break the Markdown ecosystem.',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
question: 'Is it safe to use this text cleaner?',
|
|
23
|
+
answer:
|
|
24
|
+
'Completely safe. The script runs entirely on the client side (in your own browser). Your text is never sent to any server and no one else will ever have access to what you paste here.',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
question: 'Can I use this for Twitter or other networks?',
|
|
28
|
+
answer:
|
|
29
|
+
'Yes, in addition to fixing Reddit posts, removing multiple spaces and strange characters is useful for any publication on blogs, Twitter, old phpBB forums or any other social platform where you need clean, neutral text.',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const howToData = [
|
|
34
|
+
{
|
|
35
|
+
name: 'Paste your text',
|
|
36
|
+
text: 'Copy your text from Word, Google Docs or any source and paste it into the input field.',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'Choose the options',
|
|
40
|
+
text: 'Toggle options on or off depending on what you need: fix paragraphs, remove spaces, or clean hidden characters.',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Review the result',
|
|
44
|
+
text: 'The clean text appears in real time in the output field, ready to publish.',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Copy and post',
|
|
48
|
+
text: 'Click "Copy Text" and paste it directly into Reddit or any forum.',
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
const faqSchema: WithContext<FAQPage> = {
|
|
53
|
+
'@context': 'https://schema.org',
|
|
54
|
+
'@type': 'FAQPage',
|
|
55
|
+
mainEntity: faqData.map((item) => ({
|
|
56
|
+
'@type': 'Question',
|
|
57
|
+
name: item.question,
|
|
58
|
+
acceptedAnswer: { '@type': 'Answer', text: item.answer },
|
|
59
|
+
})),
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const howToSchema: WithContext<HowToThing> = {
|
|
63
|
+
'@context': 'https://schema.org',
|
|
64
|
+
'@type': 'HowTo',
|
|
65
|
+
name: title,
|
|
66
|
+
description,
|
|
67
|
+
step: howToData.map((step, i) => ({
|
|
68
|
+
'@type': 'HowToStep',
|
|
69
|
+
position: i + 1,
|
|
70
|
+
name: step.name,
|
|
71
|
+
text: step.text,
|
|
72
|
+
})),
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const appSchema: WithContext<SoftwareApplication> = {
|
|
76
|
+
'@context': 'https://schema.org',
|
|
77
|
+
'@type': 'SoftwareApplication',
|
|
78
|
+
name: title,
|
|
79
|
+
description,
|
|
80
|
+
applicationCategory: 'UtilityApplication',
|
|
81
|
+
operatingSystem: 'All',
|
|
82
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'USD' },
|
|
83
|
+
inLanguage: 'en',
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const content: ToolLocaleContent<RedditFormatterUI> = {
|
|
87
|
+
slug,
|
|
88
|
+
title,
|
|
89
|
+
description,
|
|
90
|
+
faqTitle: 'Frequently Asked Questions',
|
|
91
|
+
faq: faqData,
|
|
92
|
+
bibliographyTitle: 'References',
|
|
93
|
+
bibliography: [
|
|
94
|
+
{
|
|
95
|
+
name: 'Reddit Help: Formatting text in posts and comments',
|
|
96
|
+
url: 'https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-text-in-posts-and-comments',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'Reddit Markdown guide',
|
|
100
|
+
url: 'https://www.reddit.com/wiki/markdown/',
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
howTo: howToData,
|
|
104
|
+
schemas: [faqSchema, howToSchema, appSchema],
|
|
105
|
+
seo: [
|
|
106
|
+
{
|
|
107
|
+
type: 'title',
|
|
108
|
+
text: 'The Ultimate Formatting Tool for Reddit and Web Forums',
|
|
109
|
+
level: 2,
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
type: 'paragraph',
|
|
113
|
+
html: 'Creating posts on Reddit or any platform that relies on Markdown can be frustrating. A common problem when copying and pasting text from complex word processors or web pages is that line breaks get altered. When you submit the content, it often becomes a solid, hard-to-read block, ignoring the original paragraph structure. Our formatting tool solves this problem at its root.',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
type: 'title',
|
|
117
|
+
text: 'How the Reddit Text Cleaner Works',
|
|
118
|
+
level: 3,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
type: 'paragraph',
|
|
122
|
+
html: 'The processing engine runs multiple filters on your text in real time. First, it addresses line breaks. Reddit requires a specific format where a paragraph break needs two new lines in the Markdown source code. The cleaner analyzes your text and automatically converts single line breaks into double breaks, keeping existing paragraphs intact to avoid generating excessive spacing.',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: 'paragraph',
|
|
126
|
+
html: 'Second, the tool removes invisible characters and multiple spaces. When copying text from websites, it is common to drag along zero-width characters that break formatting or cause strange behavior in forums. The cleaner purges these intrusive web elements and normalizes repeated spaces into a single clean space. Optionally, you can strip and remove all raw hyperlinks from your content to post completely neutral text.',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: 'title',
|
|
130
|
+
text: 'Benefits of Using a Specialized Text Cleaner',
|
|
131
|
+
level: 3,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: 'list',
|
|
135
|
+
items: [
|
|
136
|
+
'<strong>Optimized Readability:</strong> Ensures your readers on Reddit see properly structured text instead of an intimidating wall of words.',
|
|
137
|
+
'<strong>Time Saving:</strong> Forget pressing Enter hundreds of times to fix broken formatting. Paste your content and copy it ready in under a second.',
|
|
138
|
+
'<strong>Metadata and Web Junk Removal:</strong> Protects your post from weird styles or breaks caused by zero-width spaces.',
|
|
139
|
+
'<strong>High Privacy:</strong> All processing is client-side. The text never leaves your browser or gets stored on external servers.',
|
|
140
|
+
],
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
type: 'title',
|
|
144
|
+
text: 'The Problem with Word Processors and Reddit',
|
|
145
|
+
level: 3,
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
type: 'paragraph',
|
|
149
|
+
html: 'Applications like Microsoft Word or Google Docs add an invisible layer of rich formatting over their text. When you copy and paste that content directly into the basic editor or Reddit\'s Markdown mode, the rich formatting disappears and what remains is often a structureless amalgam. Reddit uses a fairly strict variant of Markdown. If you are not familiar with Reddit\'s syntax or simply want a smoother process when transferring essays or stories to the forum, cleaning the text here first prevents your post from receiving downvotes simply because it is impossible to read comfortably.',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
type: 'title',
|
|
153
|
+
text: 'Best Practices for Posting in Forums',
|
|
154
|
+
level: 3,
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
type: 'paragraph',
|
|
158
|
+
html: 'Correct formatting is vital for generating discussion and maintaining community attention. Posts with very long lines or nonexistent paragraphs are often abandoned after the first few sentences. Use this cleaning tool to lay the structural foundations. Then, add formatting like bold and italics strategically within the Reddit editor itself to highlight key ideas. Always review the preview and take advantage of structured lists to enumerate important points or detailed guides.',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
type: 'title',
|
|
162
|
+
text: 'Transformation Example',
|
|
163
|
+
level: 3,
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
type: 'tip',
|
|
167
|
+
title: 'Before and after the formatter',
|
|
168
|
+
html: '<p><strong>Original pasted text:</strong></p><pre>Hello this is the first line\nand this was supposed to be the second\nbut on Reddit everything runs together when you paste it.</pre><p><strong>Formatted text:</strong></p><pre>Hello this is the first line\n\nand this was supposed to be the second\n\nbut on Reddit everything runs together when you paste it.</pre>',
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
type: 'title',
|
|
172
|
+
text: 'Frequently Asked Questions about the Reddit Text Formatter',
|
|
173
|
+
level: 3,
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
type: 'paragraph',
|
|
177
|
+
html: "Finding the right answers about how to interact with Reddit's editorial rules is not always obvious. Check the FAQ section where we address the main questions about valid formats and how to avoid being penalized for massive walls of text.",
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
ui: {
|
|
181
|
+
labelInput: 'Original Text',
|
|
182
|
+
placeholderInput: 'Paste your original text here...',
|
|
183
|
+
labelOptions: 'Formatting Options',
|
|
184
|
+
optionParagraphs: 'Fix Reddit-style Paragraphs',
|
|
185
|
+
optionSpaces: 'Remove multiple spaces',
|
|
186
|
+
optionInvisible: 'Clean hidden web characters',
|
|
187
|
+
optionLinks: 'Extract URLs (Text only)',
|
|
188
|
+
labelOutput: 'Clean Text',
|
|
189
|
+
placeholderOutput: 'The cleaning result will appear here...',
|
|
190
|
+
btnCopy: 'Copy Text',
|
|
191
|
+
btnCopied: 'Copied',
|
|
192
|
+
},
|
|
193
|
+
};
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
3
|
+
import type { RedditFormatterUI } from '../ui';
|
|
4
|
+
|
|
5
|
+
const slug = 'formateador-reddit';
|
|
6
|
+
const title = 'Formateador Reddit - Limpiador y Adaptador de Texto';
|
|
7
|
+
const description =
|
|
8
|
+
'Limpiador avanzado de texto para publicar en Reddit. Arregla los saltos de línea perdidos, elimina espacios múltiples y caracteres ocultos que rompen el Markdown.';
|
|
9
|
+
|
|
10
|
+
const faqData = [
|
|
11
|
+
{
|
|
12
|
+
question: '¿Por qué mi texto en Reddit pierde los saltos de línea?',
|
|
13
|
+
answer:
|
|
14
|
+
'Reddit utiliza Markdown, que requiere que presiones doble espacio al final de una línea antes de pulsar Intro para crear un salto normal, o que pulses Intro dos veces para crear un nuevo párrafo. Nuestra herramienta ajusta esto automáticamente insertando dobles saltos de línea.',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
question: '¿Qué son los caracteres ocultos o invisibles?',
|
|
18
|
+
answer:
|
|
19
|
+
'Muchas veces, al copiar de procesadores de texto complejos, se adhieren marcadores de formato de longitud cero. Estos elementos son invisibles en la web normal pero pueden romper el ecosistema de Markdown.',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
question: '¿Es seguro usar este limpiador de texto?',
|
|
23
|
+
answer:
|
|
24
|
+
'Completamente seguro. El script se ejecuta enteramente en el lado del cliente (en tu propio navegador). Tus textos no son enviados a ningún servidor y nunca nadie más tendrá acceso a lo que copies aquí.',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
question: '¿Puedo usar esto para Twitter u otras redes?',
|
|
28
|
+
answer:
|
|
29
|
+
'Sí, además de arreglar Reddit, remover espacios múltiples y caracteres extraños es útil para cualquier publicación en blogs, Twitter, foros phpBB antiguos o cualquier otra plataforma social donde necesites texto neutro y muy limpio.',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const howToData = [
|
|
34
|
+
{
|
|
35
|
+
name: 'Pega tu texto',
|
|
36
|
+
text: 'Copia tu texto desde Word, Google Docs o cualquier fuente y pégalo en el campo de entrada.',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'Elige las opciones',
|
|
40
|
+
text: 'Activa o desactiva las opciones según lo que necesites: arreglar párrafos, eliminar espacios o limpiar caracteres ocultos.',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Revisa el resultado',
|
|
44
|
+
text: 'El texto limpio aparece en tiempo real en el campo de salida, listo para publicar.',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Copia y publica',
|
|
48
|
+
text: 'Haz clic en "Copiar Texto" y pégalo directamente en Reddit o cualquier foro.',
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
const faqSchema: WithContext<FAQPage> = {
|
|
53
|
+
'@context': 'https://schema.org',
|
|
54
|
+
'@type': 'FAQPage',
|
|
55
|
+
mainEntity: faqData.map((item) => ({
|
|
56
|
+
'@type': 'Question',
|
|
57
|
+
name: item.question,
|
|
58
|
+
acceptedAnswer: { '@type': 'Answer', text: item.answer },
|
|
59
|
+
})),
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const howToSchema: WithContext<HowToThing> = {
|
|
63
|
+
'@context': 'https://schema.org',
|
|
64
|
+
'@type': 'HowTo',
|
|
65
|
+
name: title,
|
|
66
|
+
description,
|
|
67
|
+
step: howToData.map((step, i) => ({
|
|
68
|
+
'@type': 'HowToStep',
|
|
69
|
+
position: i + 1,
|
|
70
|
+
name: step.name,
|
|
71
|
+
text: step.text,
|
|
72
|
+
})),
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const appSchema: WithContext<SoftwareApplication> = {
|
|
76
|
+
'@context': 'https://schema.org',
|
|
77
|
+
'@type': 'SoftwareApplication',
|
|
78
|
+
name: title,
|
|
79
|
+
description,
|
|
80
|
+
applicationCategory: 'UtilityApplication',
|
|
81
|
+
operatingSystem: 'All',
|
|
82
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
83
|
+
inLanguage: 'es',
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const content: ToolLocaleContent<RedditFormatterUI> = {
|
|
87
|
+
slug,
|
|
88
|
+
title,
|
|
89
|
+
description,
|
|
90
|
+
faqTitle: 'Preguntas Frecuentes',
|
|
91
|
+
faq: faqData,
|
|
92
|
+
bibliographyTitle: 'Referencias',
|
|
93
|
+
bibliography: [
|
|
94
|
+
{
|
|
95
|
+
name: 'Reddit Help: Formatting text in posts and comments',
|
|
96
|
+
url: 'https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-text-in-posts-and-comments',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'Reddit Markdown guide',
|
|
100
|
+
url: 'https://www.reddit.com/wiki/markdown/',
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
howTo: howToData,
|
|
104
|
+
schemas: [faqSchema, howToSchema, appSchema],
|
|
105
|
+
seo: [
|
|
106
|
+
{
|
|
107
|
+
type: 'title',
|
|
108
|
+
text: 'La Herramienta Definitiva de Formateo para Reddit y Foros Web',
|
|
109
|
+
level: 2,
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
type: 'paragraph',
|
|
113
|
+
html: 'Crear publicaciones en Reddit o en cualquier plataforma que dependa de Markdown puede resultar frustrante. Un error frecuente al copiar y pegar texto desde procesadores de texto complejos o páginas web es la alteración de los saltos de línea. Al enviar el contenido, este suele convertirse en un bloque sólido y difícil de leer, ignorando la estructura original de los párrafos. Nuestra herramienta de formateo resuelve este problema de raíz.',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
type: 'title',
|
|
117
|
+
text: 'Cómo Funciona el Limpiador de Textos para Reddit',
|
|
118
|
+
level: 3,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
type: 'paragraph',
|
|
122
|
+
html: 'El motor de procesamiento ejecuta múltiples filtros sobre tu texto en tiempo real. En primer lugar, aborda los saltos de línea. Reddit requiere un formato específico donde un salto de párrafo necesita dos líneas nuevas en el código fuente Markdown. El limpiador analiza tu texto y convierte automáticamente los saltos de línea simples en saltos dobles, manteniendo intactos los párrafos existentes para no generar espacios excesivos.',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: 'paragraph',
|
|
126
|
+
html: 'En segundo lugar, la herramienta elimina los caracteres invisibles y los espacios múltiples. Al copiar texto de sitios web, es común arrastrar caracteres sin ancho que rompen el formato o causan comportamientos extraños en los foros. El limpiador purga estos elementos web intrusivos y normaliza los espacios repetidos en un solo espacio limpio. De manera opcional, puedes extraer y eliminar todos los enlaces hipertextuales en crudo de tu contenido para publicar texto completamente neutro.',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: 'title',
|
|
130
|
+
text: 'Ventajas de Usar un Limpiador de Textos Especializado',
|
|
131
|
+
level: 3,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: 'list',
|
|
135
|
+
items: [
|
|
136
|
+
'<strong>Legibilidad Optimizada:</strong> Asegura que tus lectores en Reddit vean un texto estructurado correctamente en lugar de un bloque intimidante.',
|
|
137
|
+
'<strong>Ahorro de Tiempo:</strong> Olvídate de pulsar Enter cientos de veces para arreglar formato roto. Pega tu información y cópiala ya lista en menos de un segundo.',
|
|
138
|
+
'<strong>Eliminación de Metadatos y Basura Web:</strong> Protege tu publicación de estilos raros o roturas causadas por el espacio sin ancho.',
|
|
139
|
+
'<strong>Alta Privacidad:</strong> Todo el procesamiento es client-side. El texto nunca abandona tu navegador ni se almacena en servidores externos.',
|
|
140
|
+
],
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
type: 'title',
|
|
144
|
+
text: 'El Problema con los Procesadores de Texto y Reddit',
|
|
145
|
+
level: 3,
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
type: 'paragraph',
|
|
149
|
+
html: 'Aplicaciones como Microsoft Word o Google Docs añaden una capa invisible de formato rico sobre su texto. Cuando copias y pegas ese contenido directamente en el editor básico o en el modo Markdown de Reddit, el formato rico desaparece y lo que queda muchas veces es una amalgama sin estructura. Reddit utiliza una variante de Markdown bastante estricta. Si no estás familiarizado con la sintaxis de Reddit o simplemente quieres un proceso más fluido al trasladar ensayos o historias al foro, limpiar el texto aquí primero previene que tu publicación reciba votos negativos simplemente por ser imposible de leer de forma cómoda y natural.',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
type: 'title',
|
|
153
|
+
text: 'Buenas Prácticas para Publicar en Foros',
|
|
154
|
+
level: 3,
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
type: 'paragraph',
|
|
158
|
+
html: 'Un formato correcto es vital para generar debate y mantener la atención de la comunidad. Las publicaciones con líneas muy largas o párrafos inexistentes suelen ser abandonadas en las primeras oraciones. Utiliza esta herramienta de limpieza para asentar las bases estructurales. Luego, añade formato como negritas y cursivas de manera estratégica dentro del propio editor de Reddit para destacar ideas clave. Recuerda revisar siempre la vista previa y aprovechar las listas estructuradas para enumerar puntos importantes o guías detalladas.',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
type: 'title',
|
|
162
|
+
text: 'Ejemplo de Transformación',
|
|
163
|
+
level: 3,
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
type: 'tip',
|
|
167
|
+
title: 'Antes y después del formateador',
|
|
168
|
+
html: '<p><strong>Texto original pegado:</strong></p><pre>Hola esto es la primera linea\ny esta pensaba que era la segunda\npero en reddit sale todo junto si lo pegas.</pre><p><strong>Texto formateado:</strong></p><pre>Hola esto es la primera linea\n\ny esta pensaba que era la segunda\n\npero en reddit sale todo junto si lo pegas.</pre>',
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
type: 'title',
|
|
172
|
+
text: 'Preguntas Frecuentes sobre el Formateador de Textos de Reddit',
|
|
173
|
+
level: 3,
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
type: 'paragraph',
|
|
177
|
+
html: 'Encontrar las respuestas correctas sobre cómo interactuar con las normas editoriales de Reddit no siempre es obvio. Revisa la sección de FAQ donde resolvemos las dudas principales sobre los formatos válidos y cómo evitar ser penalizado por bloques de texto masivos.',
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
ui: {
|
|
181
|
+
labelInput: 'Texto Original',
|
|
182
|
+
placeholderInput: 'Pega tu texto original aquí...',
|
|
183
|
+
labelOptions: 'Opciones de Formateo',
|
|
184
|
+
optionParagraphs: 'Arreglar Párrafos al estilo Reddit',
|
|
185
|
+
optionSpaces: 'Eliminar espacios múltiples',
|
|
186
|
+
optionInvisible: 'Limpiar caracteres web ocultos',
|
|
187
|
+
optionLinks: 'Extraer URLs (Dejar solo texto)',
|
|
188
|
+
labelOutput: 'Texto Limpio',
|
|
189
|
+
placeholderOutput: 'El resultado de la limpieza se verá aquí...',
|
|
190
|
+
btnCopy: 'Copiar Texto',
|
|
191
|
+
btnCopied: 'Copiado',
|
|
192
|
+
},
|
|
193
|
+
};
|