Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"sozluktanimgirmeyeri"
Bootstrap 4.1.1 Snippet by
farukciftler
4.1.1
Preview
HTML
JS
View Full Screen
Fork
Fork this
139
 
0 Fav
Post to Facebook
Tweet this
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <form class="" asp-controller="Entry" asp-action="Addentry" method="post"> <input type="text" name="subject" value="@ViewBag.Subject" placeholder="" style="width: 100%;" hidden> <input type="text" name="subjectId" value="@_helper.GetSubjectIdByName(ViewBag.Subject)" hidden /> <br><br> <label for="" style="" class="Helvetica">Tanım: </label> <textarea type="text" name="entry" id="girdi-area" value="" class="md-textarea form-control Helvetica" rows="3" required></textarea> <button id="girdi-area2" type="button" class="btn btn-dark Helvetica" style="margin-top: 10px; margin-right: 2px; float: left" onClick="formatText ('b');">b</button> <button type="button" class="btn btn-dark Helvetica" style="margin-top: 10px; margin-right: 2px; float: left" onClick="formatText ('i');">i</button> <button type="button" class="btn btn-dark Helvetica" style="margin-top: 10px; margin-right: 2px; float: left" onClick="formatText ('bkz');">bkz</button> <button type="button" class="btn btn-dark Helvetica" style="margin-top: 10px; margin-right: 2px; float: left" onClick="formatText ('gbkz');">gbkz</button> <!-- <button type="button" class="btn btn-dark Helvetica" style="margin-top: 10px; margin-right: 2px; float: left" onClick="formatText ('u');">*</button>--> <button type="button" class="btn btn-dark Helvetica" style="margin-top: 10px; margin-right: 2px; float: left" onClick="alinti();">alıntı</button> <button type="button" class="btn btn-dark Helvetica" style="margin-top: 10px; margin-right: 2px; float: left" onClick="spoiler();">spoiler</button> <button type="submit" class="btn btn-dark Helvetica" style="margin-top: 10px; float: right;">Gönder</button> </form>
function formatText(tag) { var myTextArea = document.getElementById('girdi-area'); var myTextAreaValue = myTextArea.value; var selected_txt = myTextAreaValue.substring(myTextArea.selectionStart, myTextArea.selectionEnd); var before_txt = myTextAreaValue.substring(0, myTextArea.selectionStart); var after_txt = myTextAreaValue.substring(myTextArea.selectionEnd, myTextAreaValue.length); myTextArea.value = before_txt + '('+ tag +': ' + selected_txt + ')' + after_txt; } function alinti() { var myTextArea = document.getElementById('girdi-area'); var myTextAreaValue = myTextArea.value; var selected_txt = myTextAreaValue.substring(myTextArea.selectionStart, myTextArea.selectionEnd); var before_txt = myTextAreaValue.substring(0, myTextArea.selectionStart); var after_txt = myTextAreaValue.substring(myTextArea.selectionEnd, myTextAreaValue.length); myTextArea.value = before_txt + '----(gbkz: alıntı)---\n\n' + selected_txt + '\n\n----(gbkz: alıntı)---\n\n' + after_txt; } function spoiler() { var myTextArea = document.getElementById('girdi-area'); var myTextAreaValue = myTextArea.value; var selected_txt = myTextAreaValue.substring(myTextArea.selectionStart, myTextArea.selectionEnd); var before_txt = myTextAreaValue.substring(0, myTextArea.selectionStart); var after_txt = myTextAreaValue.substring(myTextArea.selectionEnd, myTextAreaValue.length); myTextArea.value = before_txt + '--! (gbkz: spoiler) !--\n\n' + selected_txt + '\n\n--! (gbkz: spoiler) !--\n\n' + after_txt; }
Related:
See More
Template
Material Dashboard Pro BS3
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76