-
Notifications
You must be signed in to change notification settings - Fork 1
/
CreateBlog.html
60 lines (59 loc) · 2.15 KB
/
CreateBlog.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Create New Blog</title>
<link rel="stylesheet" href="CreateBlog.css">
</head>
<body>
<script>
function Bold(){
let content = document.getElementById("output-text");
let result = content.style.fontWeight = 'bold';
document.getElementById("output-text") = result
}
function italic(){
let content = document.getElementById("output-text");
let result = content.style.fontStyle = "italic";
document.getElementById("output-text") = result
}
function UnderLine(){
let content = document.getElementById("output-text");
let result = content.style.textDecoration = "underline";
document.getElementById("output-text") = result
}
var changeFontStyle = function (font) {
document.getElementById(
"output-text").style.fontFamily
= font.value;
}
</script>
<div class="Background">
<div class="MainBody">
<div class="TextArea">
<input type="text" name="" id="Title_" placeholder="Title" required>
<input type="text" placeholder="Author Name" id="AuthorName" required>
</div>
<textarea name="" placeholder="Your TextArea" id="output-text" required cols="30" rows="10"></textarea>
<div class="bottomNavBar">
<button onclick="Bold()"><b>B</b></button>
<button onclick="italic()"><em>I</em></button>
<button onclick="UnderLine()"><u>U</u></button>
<button type="submit">Publish</button>
</div>
<select id="input-font" class="input"
onchange="changeFontStyle (this);">
<option value="Times New Roman"
selected="selected">
Times New Roman
</option>
<option value="Arial">Arial</option>
<option value="fantasy">Fantasy</option>
<option value="cursive">cursive</option>
</select>
</div>
</div>
</body>
</html>