Add 3 files
Browse files- README.md +7 -5
- index.html +434 -19
- prompts.txt +1 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: conversor-texto-html
|
| 3 |
+
emoji: ⚛️
|
| 4 |
+
colorFrom: red
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- QwenSite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,434 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="pt-BR">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Ferramenta de Conversão de Caracteres Especiais em HTML</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
|
| 9 |
+
<style>
|
| 10 |
+
body {
|
| 11 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 12 |
+
background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
|
| 13 |
+
}
|
| 14 |
+
.innertube {
|
| 15 |
+
background: white;
|
| 16 |
+
border-radius: 12px;
|
| 17 |
+
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
|
| 18 |
+
padding: 30px;
|
| 19 |
+
transition: all 0.3s ease;
|
| 20 |
+
}
|
| 21 |
+
.innertube:hover {
|
| 22 |
+
transform: translateY(-5px);
|
| 23 |
+
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
|
| 24 |
+
}
|
| 25 |
+
.textarea-custom {
|
| 26 |
+
border: 2px solid #e2e8f0;
|
| 27 |
+
border-radius: 8px;
|
| 28 |
+
padding: 12px;
|
| 29 |
+
font-size: 16px;
|
| 30 |
+
transition: all 0.3s ease;
|
| 31 |
+
resize: vertical;
|
| 32 |
+
min-height: 120px;
|
| 33 |
+
}
|
| 34 |
+
.textarea-custom:focus {
|
| 35 |
+
outline: none;
|
| 36 |
+
border-color: #3b82f6;
|
| 37 |
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
| 38 |
+
}
|
| 39 |
+
.button {
|
| 40 |
+
background: linear-gradient(135deg, #4f46e5 0%, #312e81 100%);
|
| 41 |
+
color: white;
|
| 42 |
+
border: none;
|
| 43 |
+
padding: 10px 24px;
|
| 44 |
+
border-radius: 8px;
|
| 45 |
+
font-weight: 600;
|
| 46 |
+
cursor: pointer;
|
| 47 |
+
transition: all 0.3s ease;
|
| 48 |
+
}
|
| 49 |
+
.button:hover {
|
| 50 |
+
transform: translateY(-2px);
|
| 51 |
+
box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
|
| 52 |
+
}
|
| 53 |
+
.button:active {
|
| 54 |
+
transform: translateY(0);
|
| 55 |
+
}
|
| 56 |
+
.download-btn {
|
| 57 |
+
background: linear-gradient(135deg, #10b981 0%, #065f46 100%);
|
| 58 |
+
color: white;
|
| 59 |
+
border: none;
|
| 60 |
+
padding: 10px 20px;
|
| 61 |
+
border-radius: 8px;
|
| 62 |
+
font-weight: 600;
|
| 63 |
+
cursor: pointer;
|
| 64 |
+
display: flex;
|
| 65 |
+
align-items: center;
|
| 66 |
+
gap: 8px;
|
| 67 |
+
transition: all 0.3s ease;
|
| 68 |
+
}
|
| 69 |
+
.download-btn:hover {
|
| 70 |
+
transform: translateY(-2px);
|
| 71 |
+
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
|
| 72 |
+
}
|
| 73 |
+
.pre-code {
|
| 74 |
+
background-color: #f8fafc;
|
| 75 |
+
border: 1px solid #e2e8f0;
|
| 76 |
+
border-radius: 8px;
|
| 77 |
+
padding: 16px;
|
| 78 |
+
overflow-x: auto;
|
| 79 |
+
font-family: 'Courier New', monospace;
|
| 80 |
+
}
|
| 81 |
+
.sample-text {
|
| 82 |
+
animation: highlight 1s ease-in-out;
|
| 83 |
+
}
|
| 84 |
+
@keyframes highlight {
|
| 85 |
+
0% { background-color: #fef3c7; }
|
| 86 |
+
100% { background-color: white; }
|
| 87 |
+
}
|
| 88 |
+
.instructions {
|
| 89 |
+
background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
|
| 90 |
+
color: #1e3a8a;
|
| 91 |
+
padding: 20px;
|
| 92 |
+
border-radius: 8px;
|
| 93 |
+
margin: 20px 0;
|
| 94 |
+
border-left: 5px solid #3b82f6;
|
| 95 |
+
}
|
| 96 |
+
.feature-icon {
|
| 97 |
+
font-size: 24px;
|
| 98 |
+
color: #4f46e5;
|
| 99 |
+
}
|
| 100 |
+
</style>
|
| 101 |
+
</head>
|
| 102 |
+
<body class="min-h-screen bg-gray-50">
|
| 103 |
+
<div class="container mx-auto px-4 py-8">
|
| 104 |
+
<div class="max-w-6xl mx-auto">
|
| 105 |
+
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
| 106 |
+
<!-- Main Content -->
|
| 107 |
+
<div class="lg:col-span-2">
|
| 108 |
+
<div class="innertube">
|
| 109 |
+
<h1 class="text-3xl font-bold text-gray-800 mb-2 flex items-center">
|
| 110 |
+
<i class="fas fa-code feature-icon mr-3"></i>
|
| 111 |
+
Ferramenta de Conversão de Caracteres Especiais em HTML
|
| 112 |
+
</h1>
|
| 113 |
+
|
| 114 |
+
<div class="instructions">
|
| 115 |
+
<h3 class="font-bold text-lg mb-2"><i class="fas fa-info-circle mr-2"></i> Como usar:</h3>
|
| 116 |
+
<ol class="list-decimal pl-5 space-y-1">
|
| 117 |
+
<li>Digite ou cole seu texto com caracteres especiais na caixa abaixo</li>
|
| 118 |
+
<li>Os caracteres serão convertidos automaticamente para entidades HTML</li>
|
| 119 |
+
<li>Clique em "Converter" se a conversão automática não funcionar</li>
|
| 120 |
+
<li>Copie o resultado ou baixe como arquivo HTML</li>
|
| 121 |
+
</ol>
|
| 122 |
+
</div>
|
| 123 |
+
|
| 124 |
+
<p class="text-gray-700 mb-6 leading-relaxed">
|
| 125 |
+
A maneira mais fácil de definir um conjunto de caracteres no seu HTML é usando a tag META <strong>Content-Type</strong>.
|
| 126 |
+
Mas se por algum motivo você não puder definir um conjunto de caracteres em seus arquivos HTML, você pode codificar
|
| 127 |
+
caracteres especiais em HTML (como caracteres com acentos ou o caractere €).
|
| 128 |
+
Seu caractere será mostrado corretamente na maioria dos casos (se sua fonte suportar o caractere).
|
| 129 |
+
Caracteres codificados em HTML sempre começam com uma espereta (&) e terminam com ponto e vírgula (;).
|
| 130 |
+
O número entre eles é o número decimal da tabela <strong>UTF-8</strong>.
|
| 131 |
+
</p>
|
| 132 |
+
|
| 133 |
+
<form name="conversionForm" method="post" class="tools" onsubmit="return cschar();">
|
| 134 |
+
<p class="text-gray-700 mb-3">
|
| 135 |
+
Cole seu texto normal abaixo (incluindo caracteres especiais).
|
| 136 |
+
<button type="button" onclick="accentSample()" class="text-blue-600 hover:text-blue-800 font-medium">
|
| 137 |
+
<i class="fas fa-paste mr-1"></i> Inserir texto de exemplo
|
| 138 |
+
</button>
|
| 139 |
+
</p>
|
| 140 |
+
|
| 141 |
+
<textarea id="inputText"
|
| 142 |
+
onchange="cschar()"
|
| 143 |
+
onkeyup="cschar()"
|
| 144 |
+
name="inputText"
|
| 145 |
+
aria-label="Texto de entrada"
|
| 146 |
+
placeholder="Digite ou cole seu texto com acentos, símbolos e caracteres especiais aqui..."
|
| 147 |
+
class="textarea-custom w-full mb-4"></textarea>
|
| 148 |
+
|
| 149 |
+
<div class="flex flex-wrap gap-4 mb-4">
|
| 150 |
+
<input class="button" type="button" name="convert" value="Converter" onclick="return cschar()" />
|
| 151 |
+
<button onclick="return downl('html')" class="download-btn">
|
| 152 |
+
<i class="fa fa-download" aria-hidden="true"></i> Baixar como HTML
|
| 153 |
+
</button>
|
| 154 |
+
</div>
|
| 155 |
+
|
| 156 |
+
<p class="text-gray-700 font-medium mb-3">Seu texto codificado em HTML:</p>
|
| 157 |
+
<textarea id="outputText"
|
| 158 |
+
name="outputText"
|
| 159 |
+
readonly="readonly"
|
| 160 |
+
aria-label="Texto de saída"
|
| 161 |
+
class="textarea-custom w-full bg-gray-50 text-gray-800 font-mono text-sm"
|
| 162 |
+
placeholder="[nada ainda]"></textarea>
|
| 163 |
+
</form>
|
| 164 |
+
|
| 165 |
+
<h2 id="programming" class="text-2xl font-bold text-gray-800 mt-12 mb-4 flex items-center">
|
| 166 |
+
<i class="fas fa-laptop-code feature-icon mr-3"></i>
|
| 167 |
+
Rotinas de Programação
|
| 168 |
+
</h2>
|
| 169 |
+
|
| 170 |
+
<h3 id="php" class="text-xl font-semibold text-gray-700 mb-3 flex items-center">
|
| 171 |
+
<i class="fab fa-php text-blue-600 mr-2"></i>
|
| 172 |
+
PHP
|
| 173 |
+
</h3>
|
| 174 |
+
|
| 175 |
+
<p class="text-gray-700 mb-4">
|
| 176 |
+
Use <code class="bg-gray-200 px-2 py-1 rounded">htmlentities( string [, quote style, charset ] )</code> para converter seus caracteres em entidades HTML. Exemplo:
|
| 177 |
+
</p>
|
| 178 |
+
|
| 179 |
+
<div class="pre-code">
|
| 180 |
+
<pre><code class="php">htmlentities('ë', ENT_COMPAT, 'UTF-8')</code></pre>
|
| 181 |
+
</div>
|
| 182 |
+
|
| 183 |
+
<p class="text-gray-700 mt-4 leading-relaxed">
|
| 184 |
+
Isso gera &euml; (e a string é codificada em HTML)<br/>
|
| 185 |
+
<strong>ENT_COMPAT</strong> converterá aspas duplas e deixará aspas simples inalteradas.<br/>
|
| 186 |
+
Você também pode especificar um conjunto de caracteres para definir qual conjunto deve ser usado na conversão.
|
| 187 |
+
O padrão é UTF-8 (PHP 5.4.0+, padrão=ISO-8859-1/Latin 1 para versões mais antigas do PHP).<br/>
|
| 188 |
+
<a href="http://php.net/manual/en/function.htmlentities.php" class="text-blue-600 hover:text-blue-800 font-medium">
|
| 189 |
+
Mais informações
|
| 190 |
+
</a>
|
| 191 |
+
</p>
|
| 192 |
+
</div>
|
| 193 |
+
</div>
|
| 194 |
+
|
| 195 |
+
<!-- Sidebar -->
|
| 196 |
+
<div class="lg:col-span-1">
|
| 197 |
+
<div class="sticky top-8">
|
| 198 |
+
<div class="innertube">
|
| 199 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-4 flex items-center">
|
| 200 |
+
<i class="fas fa-compass feature-icon mr-3"></i>
|
| 201 |
+
Navegação
|
| 202 |
+
</h2>
|
| 203 |
+
|
| 204 |
+
<div class="space-y-6">
|
| 205 |
+
<div>
|
| 206 |
+
<div class="links">
|
| 207 |
+
<a href="/" class="text-gray-700 hover:text-blue-600 transition-colors duration-200 block py-2 border-b border-gray-100">
|
| 208 |
+
<i class="fas fa-home mr-2"></i> Início
|
| 209 |
+
</a>
|
| 210 |
+
</div>
|
| 211 |
+
</div>
|
| 212 |
+
|
| 213 |
+
<div>
|
| 214 |
+
<h4 class="font-semibold text-gray-800 mb-3 flex items-center">
|
| 215 |
+
<i class="fas fa-globe-americas mr-2 text-green-600"></i>
|
| 216 |
+
Ferramentas Unicode
|
| 217 |
+
</h4>
|
| 218 |
+
<div class="links space-y-2">
|
| 219 |
+
<a href="/utf8-to-latin-converter" class="text-gray-700 hover:text-blue-600 transition-colors duration-200 block py-1">
|
| 220 |
+
<i class="fas fa-exchange-alt mr-2 text-sm"></i> Conversor UTF-8 para Latin
|
| 221 |
+
</a>
|
| 222 |
+
<a href="/html-special-characters" class="text-gray-700 hover:text-blue-600 transition-colors duration-200 block py-1">
|
| 223 |
+
<i class="fas fa-code mr-2 text-sm"></i> Conversor de caracteres especiais HTML
|
| 224 |
+
</a>
|
| 225 |
+
<a href="/url-encode" class="text-gray-700 hover:text-blue-600 transition-colors duration-200 block py-1">
|
| 226 |
+
<i class="fas fa-link mr-2 text-sm"></i> Codificação/decodificação URL
|
| 227 |
+
</a>
|
| 228 |
+
<a href="/punycode" class="text-gray-700 hover:text-blue-600 transition-colors duration-200 block py-1">
|
| 229 |
+
<i class="fas fa-font mr-2 text-sm"></i> Conversor Punycode IDN
|
| 230 |
+
</a>
|
| 231 |
+
</div>
|
| 232 |
+
</div>
|
| 233 |
+
|
| 234 |
+
<div>
|
| 235 |
+
<h4 class="font-semibold text-gray-800 mb-3 flex items-center">
|
| 236 |
+
<i class="fas fa-text-height mr-2 text-purple-600"></i>
|
| 237 |
+
Ferramentas de Texto
|
| 238 |
+
</h4>
|
| 239 |
+
<div class="links space-y-2">
|
| 240 |
+
<a href="/remove-accents" class="text-gray-700 hover:text-blue-600 transition-colors duration-200 block py-1">
|
| 241 |
+
<i class="fas fa-ban mr-2 text-sm"></i> Remover todos os acentos
|
| 242 |
+
</a>
|
| 243 |
+
<a href="/uppercase" class="text-gray-700 hover:text-blue-600 transition-colors duration-200 block py-1">
|
| 244 |
+
<i class="fas fa-font mr-2 text-sm"></i> Converter para maiúsculas
|
| 245 |
+
</a>
|
| 246 |
+
<a href="/lowercase" class="text-gray-700 hover:text-blue-600 transition-colors duration-200 block py-1">
|
| 247 |
+
<i class="fas fa-font mr-2 text-sm" style="transform: scaleY(0.7); display: inline-block;"></i> Converter para minúsculas
|
| 248 |
+
</a>
|
| 249 |
+
<a href="/base64-encode" class="text-gray-700 hover:text-blue-600 transition-colors duration-200 block py-1">
|
| 250 |
+
<i class="fas fa-certificate mr-2 text-sm"></i> Codificação/decodificação Base64
|
| 251 |
+
</a>
|
| 252 |
+
<a href="/rot13" class="text-gray-700 hover:text-blue-600 transition-colors duration-200 block py-1">
|
| 253 |
+
<i class="fas fa-sync mr-2 text-sm"></i> Ferramenta cifra ROT13
|
| 254 |
+
</a>
|
| 255 |
+
<a href="/string-length" class="text-gray-700 hover:text-blue-600 transition-colors duration-200 block py-1">
|
| 256 |
+
<i class="fas fa-ruler-horizontal mr-2 text-sm"></i> Calculadora de comprimento de string
|
| 257 |
+
</a>
|
| 258 |
+
</div>
|
| 259 |
+
</div>
|
| 260 |
+
|
| 261 |
+
<div>
|
| 262 |
+
<h4 class="font-semibold text-gray-800 mb-3 flex items-center">
|
| 263 |
+
<i class="fas fa-cogs mr-2 text-orange-600"></i>
|
| 264 |
+
Programação
|
| 265 |
+
</h4>
|
| 266 |
+
<div class="links space-y-2">
|
| 267 |
+
<a href="/#set" class="text-gray-700 hover:text-blue-600 transition-colors duration-200 block py-1">
|
| 268 |
+
<i class="fas fa-sliders-h mr-2 text-sm"></i> Definir um conjunto de caracteres
|
| 269 |
+
</a>
|
| 270 |
+
<a href="/programming/converting-latin-to-utf8" class="text-gray-700 hover:text-blue-600 transition-colors duration-200 block py-1">
|
| 271 |
+
<i class="fas fa-exchange-alt mr-2 text-sm"></i> Converter Latin para UTF-8
|
| 272 |
+
</a>
|
| 273 |
+
</div>
|
| 274 |
+
</div>
|
| 275 |
+
|
| 276 |
+
<div>
|
| 277 |
+
<h4 class="font-semibold text-gray-800 mb-3 flex items-center">
|
| 278 |
+
<i class="fas fa-list mr-2 text-red-600"></i>
|
| 279 |
+
Conjuntos de Caracteres
|
| 280 |
+
</h4>
|
| 281 |
+
<div class="links space-y-2">
|
| 282 |
+
<a href="/utf-8" class="text-gray-700 hover:text-blue-600 transition-colors duration-200 block py-1">
|
| 283 |
+
<i class="fas fa-leaf mr-2 text-sm"></i> Página de códigos UTF-8
|
| 284 |
+
</a>
|
| 285 |
+
<a href="/charsets/iso-8859-1" class="text-gray-700 hover:text-blue-600 transition-colors duration-200 block py-1">
|
| 286 |
+
<i class="fas fa-tag mr-2 text-sm"></i> ISO-8859-1
|
| 287 |
+
</a>
|
| 288 |
+
<a href="/charsets/us-ascii" class="text-gray-700 hover:text-blue-600 transition-colors duration-200 block py-1">
|
| 289 |
+
<i class="fas fa-terminal mr-2 text-sm"></i> US-ASCII
|
| 290 |
+
</a>
|
| 291 |
+
<a href="/alphabet/iso-basic-latin" class="text-gray-700 hover:text-blue-600 transition-colors duration-200 block py-1">
|
| 292 |
+
<i class="fas fa-font mr-2 text-sm"></i> ISO Latin Básico
|
| 293 |
+
</a>
|
| 294 |
+
<a href="/charsets/iso-8859-1#all" class="text-gray-700 hover:text-blue-600 transition-colors duration-200 block py-1">
|
| 295 |
+
<i class="fas fa-ellipsis-h mr-2 text-sm"></i> Mais ...
|
| 296 |
+
</a>
|
| 297 |
+
</div>
|
| 298 |
+
</div>
|
| 299 |
+
</div>
|
| 300 |
+
</div>
|
| 301 |
+
</div>
|
| 302 |
+
</div>
|
| 303 |
+
</div>
|
| 304 |
+
</div>
|
| 305 |
+
</div>
|
| 306 |
+
|
| 307 |
+
<script>
|
| 308 |
+
// Função para converter caracteres especiais em entidades HTML
|
| 309 |
+
function cschar() {
|
| 310 |
+
const inputElement = document.getElementById('inputText');
|
| 311 |
+
const outputElement = document.getElementById('outputText');
|
| 312 |
+
const inputText = inputElement.value;
|
| 313 |
+
|
| 314 |
+
if (!inputText) {
|
| 315 |
+
outputElement.value = '[nada ainda]';
|
| 316 |
+
return false;
|
| 317 |
+
}
|
| 318 |
+
|
| 319 |
+
// Converter caracteres especiais
|
| 320 |
+
let convertedText = inputText
|
| 321 |
+
.replace(/&/g, '&')
|
| 322 |
+
.replace(/</g, '<')
|
| 323 |
+
.replace(/>/g, '>')
|
| 324 |
+
.replace(/"/g, '"')
|
| 325 |
+
.replace(/'/g, ''')
|
| 326 |
+
.replace(/À/g, 'À')
|
| 327 |
+
.replace(/à/g, 'à')
|
| 328 |
+
.replace(/Á/g, 'Á')
|
| 329 |
+
.replace(/á/g, 'á')
|
| 330 |
+
.replace(/Â/g, 'Â')
|
| 331 |
+
.replace(/â/g, 'â')
|
| 332 |
+
.replace(/Ã/g, 'Ã')
|
| 333 |
+
.replace(/ã/g, 'ã')
|
| 334 |
+
.replace(/Ä/g, 'Ä')
|
| 335 |
+
.replace(/ä/g, 'ä')
|
| 336 |
+
.replace(/Å/g, 'Å')
|
| 337 |
+
.replace(/å/g, 'å')
|
| 338 |
+
.replace(/È/g, 'È')
|
| 339 |
+
.replace(/è/g, 'è')
|
| 340 |
+
.replace(/É/g, 'É')
|
| 341 |
+
.replace(/é/g, 'é')
|
| 342 |
+
.replace(/Ê/g, 'Ê')
|
| 343 |
+
.replace(/ê/g, 'ê')
|
| 344 |
+
.replace(/Ë/g, 'Ë')
|
| 345 |
+
.replace(/ë/g, 'ë')
|
| 346 |
+
.replace(/Ì/g, 'Ì')
|
| 347 |
+
.replace(/ì/g, 'ì')
|
| 348 |
+
.replace(/Í/g, 'Í')
|
| 349 |
+
.replace(/í/g, 'í')
|
| 350 |
+
.replace(/Î/g, 'Î')
|
| 351 |
+
.replace(/î/g, 'î')
|
| 352 |
+
.replace(/Ï/g, 'Ï')
|
| 353 |
+
.replace(/ï/g, 'ï')
|
| 354 |
+
.replace(/Ò/g, 'Ò')
|
| 355 |
+
.replace(/ò/g, 'ò')
|
| 356 |
+
.replace(/Ó/g, 'Ó')
|
| 357 |
+
.replace(/ó/g, 'ó')
|
| 358 |
+
.replace(/Ô/g, 'Ô')
|
| 359 |
+
.replace(/ô/g, 'ô')
|
| 360 |
+
.replace(/Õ/g, 'Õ')
|
| 361 |
+
.replace(/õ/g, 'õ')
|
| 362 |
+
.replace(/Ö/g, 'Ö')
|
| 363 |
+
.replace(/ö/g, 'ö')
|
| 364 |
+
.replace(/Ù/g, 'Ù')
|
| 365 |
+
.replace(/ù/g, 'ù')
|
| 366 |
+
.replace(/Ú/g, 'Ú')
|
| 367 |
+
.replace(/ú/g, 'ú')
|
| 368 |
+
.replace(/Û/g, 'Û')
|
| 369 |
+
.replace(/û/g, 'û')
|
| 370 |
+
.replace(/Ü/g, 'Ü')
|
| 371 |
+
.replace(/ü/g, 'ü')
|
| 372 |
+
.replace(/Ç/g, 'Ç')
|
| 373 |
+
.replace(/ç/g, 'ç')
|
| 374 |
+
.replace(/Ñ/g, 'Ñ')
|
| 375 |
+
.replace(/ñ/g, 'ñ')
|
| 376 |
+
.replace(/Š/g, 'Š')
|
| 377 |
+
.replace(/š/g, 'š')
|
| 378 |
+
.replace(/Ž/g, 'Ž')
|
| 379 |
+
.replace(/ž/g, 'ž')
|
| 380 |
+
.replace(/Ø/g, 'Ø')
|
| 381 |
+
.replace(/ø/g, 'ø')
|
| 382 |
+
.replace(/Ð/g, 'Ð')
|
| 383 |
+
.replace(/ð/g, 'ð')
|
| 384 |
+
.replace(/Þ/g, 'Þ')
|
| 385 |
+
.replace(/þ/g, 'þ')
|
| 386 |
+
.replace(/ß/g, 'ß')
|
| 387 |
+
.replace(/¥/g, '¥')
|
| 388 |
+
.replace(/©/g, '©')
|
| 389 |
+
.replace(/®/g, '®')
|
| 390 |
+
.replace(/™/g, '™')
|
| 391 |
+
.replace(/€/g, '€')
|
| 392 |
+
.replace(/£/g, '£')
|
| 393 |
+
.replace(/¢/g, '¢')
|
| 394 |
+
.replace(/§/g, '§')
|
| 395 |
+
.replace(/¶/g, '¶')
|
| 396 |
+
.replace(/•/g, '•');
|
| 397 |
+
|
| 398 |
+
outputElement.value = convertedText;
|
| 399 |
+
return false;
|
| 400 |
+
}
|
| 401 |
+
|
| 402 |
+
// Função para inserir texto de exemplo
|
| 403 |
+
function accentSample() {
|
| 404 |
+
const sampleText = "Olá, mundo! Este é um texto de exemplo com acentos: à, á, â, ã, ä, è, é, ê, ë, ì, í, î, ï, ò, ó, ô, õ, ö, ù, ú, û, ü, ç, ñ. Também inclui símbolos: €, £, ¥, ©, ® e ™.";
|
| 405 |
+
document.getElementById('inputText').value = sampleText;
|
| 406 |
+
document.getElementById('inputText').classList.add('sample-text');
|
| 407 |
+
setTimeout(() => {
|
| 408 |
+
document.getElementById('inputText').classList.remove('sample-text');
|
| 409 |
+
}, 1000);
|
| 410 |
+
cschar();
|
| 411 |
+
}
|
| 412 |
+
|
| 413 |
+
// Função para baixar como arquivo HTML
|
| 414 |
+
function downl(type) {
|
| 415 |
+
const outputText = document.getElementById('outputText').value;
|
| 416 |
+
if (outputText === '[nada ainda]' || !outputText.trim()) {
|
| 417 |
+
alert('Por favor, converta um texto primeiro!');
|
| 418 |
+
return false;
|
| 419 |
+
}
|
| 420 |
+
|
| 421 |
+
let content, filename;
|
| 422 |
+
|
| 423 |
+
if (type === 'html') {
|
| 424 |
+
content = `<!DOCTYPE html>
|
| 425 |
+
<html lang="pt-BR">
|
| 426 |
+
<head>
|
| 427 |
+
<meta charset="UTF-8">
|
| 428 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 429 |
+
<title>Texto Convertido</title>
|
| 430 |
+
</head>
|
| 431 |
+
<body>
|
| 432 |
+
<p>${outputText}</p>
|
| 433 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-qwensite.hf.space/logo.svg" alt="qwensite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-qwensite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >QwenSite</a> - 🧬 <a href="https://enzostvs-qwensite.hf.space?remix=alexandremoraisdarosa/conversor-texto-html" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 434 |
+
</html>
|
prompts.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Em português. Crie um aplicativo para conversão em HTML. Gere instruções ao usuário. Considere parte do código: <h1 title="">HTML Special Characters Conversion Tool and Routines</h1> </div></div> <div id="contentwrapper"> <div id="contentcolumn"> <div id="jqlocl"></div> <div class="innertube"> <h2>HTML special character converter</h2> <p>The easiest way to set a charset in your HTML is by using the <a href="/#html">Content-Type META tag</a>. But if for some reason you cannot define a character set in your HTML files, you can HTML-encode special characters (such as characters with accents or the €-character). Your character will be shown correctly in almost all cases (if your font supports the character). HTML-encoded characters always start with an ampersand (&) and end with a semicolon (;). The number in between is the decimal number from the <a href="/utf-8">UTF-8 table</a>.</p> <form name="conversionForm" method="post" class="tools" onSubmit="return cschar();"> <p>Copy your normal text below (including special characters). <a href="javascript:accentSample()">Insert sample text</a></p> <textarea id="inputText" onChange="cschar()" onKeyUp="cschar();" name="inputText" aria-label="Input text"></textarea><br> <input class="button" type="button" name="convert" value="Convert" onClick="return cschar()" /> <p><br/><button onClick="return downl('html')"><i class="fa fa-download" aria-hidden="true"></i> Download as HTML</button> Your HTML encoded text:</p> <textarea id="outputText" name="outputText" readonly="readonly" aria-label="Output text">[nothing yet]</textarea><br> </form> <h2 id="programming">Programming routines</h2> <h3 id="php">PHP</h3> <p>Use htmlentities( <i>string</i> [, <i>quote style</i>, <i>charset</i> ] ) to convert your characters to HTML encoded characters. Example:</p> <pre><code class="php">htmlentities('ë', ENT_COMPAT, 'UTF-8')</code></pre> <p>This outputs ë (and the string is HTML encoded)<br/> ENT_COMPAT will convert double-quotes and leave single-quotes alone.<br/> You can also specify a charset to define which charset should be used in the conversion. The default is UTF-8 (PHP 5.4.0+, default=ISO-8859-1/Latin 1 for older PHP versions). <br/><a href="http://php.net/manual/en/function.htmlentities.php">More information</a></p> </div> </div> </div> <div id="jqlocr"></div> <div id="rightcolumn"> <span class="close"></span> <div class="innertube"> <h2>Pages</h2> <div class="sub firstsub"> <div class="links"><a href="/">Home</a></div> <h4>Unicode tools</h4><div class="links"> <a href="/utf8-to-latin-converter">UTF-8 to Latin converter</a><br/> <a href="/html-special-characters">HTML special character converter</a><br/> <a href="/url-encode">URL/percent encode & decode</a><br/> <a href="/punycode">Punycode IDN converter</a></div> <h4>Text manipulation tools</h4><div class="links"> <a href="/remove-accents">Remove all accents</a><br/> <a href="/uppercase">Convert to uppercase</a><br/> <a href="/lowercase">Convert to lowercase</a><br/> <a href="/base64-encode">Base64 encode & decode</a><br/> <a href="/rot13">ROT13 cipher tool</a><br/> <a href="/string-length">String length calculator</a></div> <h4>Programming</h4><div class="links"> <a href="/#set">Setting a charset</a><br/> <a href="/programming/converting-latin-to-utf8">Converting Latin to UTF-8</a></div> <h4>Character sets</h4><div class="links"> <a href="/utf-8">UTF-8 code page</a><br/> <a href="/charsets/iso-8859-1">ISO-8859-1</a><br/> <a href="/charsets/us-ascii">US-ASCII</a><br/> <a href="/alphabet/iso-basic-latin">ISO Basic Latin</a><br/> <a href="/charsets/iso-8859-1#all">More ...</a></div>
|