├── README.md
├── index.html
├── script.js
└── style.css
/README.md:
--------------------------------------------------------------------------------
1 | # Text-Editor
2 | Try This Text Editor , Built Using HTML, CSS & JavaScript
3 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Text Editor
7 |
9 |
12 |
15 |
18 |
21 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | TEXT EDITOR
37 |
38 |
39 |
40 |
42 |
44 |
47 |
50 |
52 |
54 |
56 |
58 |
60 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
75 |
76 |
77 |
78 |
79 |
80 |
83 |
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/script.js:
--------------------------------------------------------------------------------
1 | function f1() {
2 |
3 | document.getElementById("textarea1").style.fontWeight = "bold";
4 |
5 | }
6 | function f2() {
7 |
8 | document.getElementById("textarea1").style.fontStyle = "italic";
9 |
10 | }
11 | function f3() {
12 |
13 | document.getElementById("textarea1").style.textAlign = "left";
14 |
15 | }
16 | function f4() {
17 |
18 | document.getElementById("textarea1").style.textAlign = "center";
19 |
20 | }
21 | function f5() {
22 |
23 | document.getElementById("textarea1").style.textAlign = "right";
24 |
25 | }
26 |
27 | function f6() {
28 |
29 | document.getElementById("textarea1").style.textTransform = "uppercase";
30 |
31 | }
32 | function f7() {
33 |
34 | document.getElementById("textarea1").style.textTransform = "lowercase";
35 |
36 | }
37 | function f8() {
38 |
39 | document.getElementById("textarea1").style.textTransform = "capitalize";
40 |
41 | }
42 | function f9() {
43 |
44 | document.getElementById("textarea1").style.fontWeight = "normal";
45 | document.getElementById("textarea1").style.textAlign = "left";
46 | document.getElementById("textarea1").style.fontStyle = "normal";
47 | document.getElementById("textarea1").style.textTransform = "capitalize";
48 | document.getElementById("textarea1").value = " ";
49 |
50 |
51 |
52 | }
53 |
54 | function f10() {
55 | const content = document.getElementById("textarea1").value;
56 | var save = document.createElement("a");
57 | save.setAttribute("href", "data:text/plain;charset=umenttttf-8," + encodeURI(content));
58 | save.setAttribute("download", content.slice(0, 17) + ".txt");
59 |
60 | document.body.appendChild(save);
61 | save.click();
62 | document.body.removeChild(save);
63 | }
--------------------------------------------------------------------------------
/style.css:
--------------------------------------------------------------------------------
1 | h1 {
2 | padding-top: 40px;
3 | padding-bottom: 40px;
4 | text-align: center;
5 | color: #957dad;
6 | font-family: 'Montserrat', sans-serif;
7 |
8 | }
9 |
10 | section {
11 | padding: 5%;
12 | padding-top: 0;
13 | height: 100vh;
14 |
15 | }
16 |
17 | .side {
18 | margin-left: 0;
19 | }
20 |
21 | button {
22 | margin: 10px;
23 | border-color: #957dad !important;
24 | color: #888888 !important;
25 | margin-bottom: 25px;
26 | }
27 |
28 | button:hover {
29 | background-color: #fec8d8 !important;
30 | }
31 |
32 | textarea {
33 | padding: 3%;
34 | border-color: #957dad;
35 | border-width: thick;
36 | }
37 |
38 | .flex-box {
39 | display: flex;
40 | justify-content: center;
41 | }
--------------------------------------------------------------------------------