-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtext.html
72 lines (66 loc) · 2.67 KB
/
text.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon"
href="https://upload.wikimedia.org/wikipedia/commons/thumb/6/61/HTML5_logo_and_wordmark.svg/800px-HTML5_logo_and_wordmark.svg.png"
type="image/png" />
<title>HTML | Conversor</title>
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<script
src="https://cdn.jsdelivr.net/npm/@tinymce/tinymce-webcomponent@2/dist/tinymce-webcomponent.min.js"></script>
</head>
<body>
<!-- <div>
<h1 style="font-size: 30px;">Selecione uma das opções de conversão de dados HTML</h1>
</div> -->
<a href="index.html">
<button id="" class="button-18" role="button">
Converter HTML para Texto
</button>
</a>
<a href="text.html">
<button id="" class="button-18" role="button">
Converter Texto para HTML
</button>
</a>
<a href="json.html">
<button id="" class="button-18" role="button">
Converter JSON para XLSX
</button>
</a>
<h1>Adicione para converter texto para HTML</h1>
<section>
<!-- <textarea rows="10" id="valorInserido" class="insertTextArea"></textarea> -->
<tinymce-editor id="textEditor" api-key="su59e7h0mpqs8jv12lakw5vhu5do6j626dyw7jm3077nmupi" height="300"
menubar="false" plugins="advlist autolink lists link image charmap preview anchor
searchreplace visualblocks code fullscreen
insertdatetime media table code help wordcount" toolbar="undo redo | blocks | bold italic backcolor |
alignleft aligncenter alignright alignjustify |
bullist numlist outdent indent | removeformat | help" content_style="body
{
font-family:Helvetica,Arial,sans-serif;
font-size:14px
}">
</tinymce-editor>
<button type="submit" id="submitText" class="button-18" role="button">
Aplicar
</button>
<details open>
<summary>Resultado do conteúdo HTML</summary>
<div id="resultadoText"></div>
</details>
</section>
<script>
document.getElementById("submitText").addEventListener("click", function () {
var editor = tinymce.get("textEditor");
var content = editor.getContent({ format: "raw" });
// Exibe o conteúdo HTML puro no resultadoText
document.getElementById("resultadoText").textContent = content;
// Log no console do valor capturado
console.log("Valor HTML puro do editor:", content);
});
</script>
</body>
</html>