{"id":229,"date":"2024-05-05T08:46:49","date_gmt":"2024-05-05T08:46:49","guid":{"rendered":"https:\/\/worldseotool.com\/?page_id=229"},"modified":"2024-05-05T08:46:49","modified_gmt":"2024-05-05T08:46:49","slug":"spell-checker","status":"publish","type":"page","link":"https:\/\/shoptips24.com\/tools\/spell-checker\/","title":{"rendered":"Spell Checker"},"content":{"rendered":"\n\n    <style>\n        \n        }\n\n        h1 {\n            margin-top: 30px;\n        }\n\n        #input-text {\n            width: 80%;\n            height: 200px;\n            margin: 20px auto;\n            display: block;\n            resize: none;\n        }\n\n        #check-button {\n            margin-bottom: 20px;\n            padding: 10px 20px;\n            background-color: #007bff;\n            color: white;\n            border: none;\n            cursor: pointer;\n        }\n\n        #check-button:hover {\n            background-color: #0056b3;\n        }\n\n        .correct {\n            color: green;\n            font-weight: bold;\n        }\n\n        .incorrect {\n            color: red;\n            font-weight: bold;\n        }\n    <\/style>\n\n<body>\n    <h1>Spell Checker &amp; Word Counter Tool<\/h1>\n    <textarea id=\"input-text\" placeholder=\"Paste your text here...\"><\/textarea>\n    <br \/>\n    <button id=\"check-button\">Check Spelling<\/button>\n    <br \/>\n    <div id=\"word-count\"><\/div>\n\n    <script>\n        document.getElementById('check-button').addEventListener('click', function() {\n            var inputText = document.getElementById('input-text').value.trim();\n            var words = inputText.split(\/\\s+\/);\n\n            \/\/ Dictionary of common words for simplicity\n            var dictionary = ['apple', 'banana', 'orange', 'grape', 'pear'];\n\n            var correctCount = 0;\n            var incorrectCount = 0;\n\n            words.forEach(function(word, index) {\n                \/\/ Remove punctuation marks\n                var cleanWord = word.replace(\/[.,\\\/#!$%\\^&\\*;:{}=\\-_`~()]\/g,\"\");\n                \/\/ Convert to lowercase for case-insensitive comparison\n                var lowercaseWord = cleanWord.toLowerCase();\n\n                \/\/ Check if word is in dictionary\n                if (dictionary.includes(lowercaseWord)) {\n                    \/\/ Mark as correct spelling\n                    words[index] = '<span class=\"correct\">' + word + ' (SPEL SAHI)<\/span>';\n                    correctCount++;\n                } else {\n                    \/\/ Highlight word with red color and mark as wrong spelling\n                    words[index] = '<span class=\"incorrect\">' + word + ' (GALAT)<\/span>';\n                    incorrectCount++;\n                }\n            });\n\n            \/\/ Join the words back into text\n            var resultText = words.join(' ');\n\n            \/\/ Display result\n            document.getElementById('input-text').innerHTML = resultText;\n\n            \/\/ Display word count\n            var wordCount = words.length;\n            document.getElementById('word-count').innerHTML = 'Total Words: ' + wordCount + '<br>' +\n                                                             'Correct Spellings: ' + correctCount + '<br>' +\n                                                             'Incorrect Spellings: ' + incorrectCount;\n        });\n    <\/script>\n<\/body><div class=\"separator\" style=\"clear: both; text-align: center;\"><a href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjVDrM6DIhC8MmutM-oTGH4-tCla3UDIJwoPvgNjFn2IHIT7CjhUFMGtBbNEpe5UxntDxnA6gkzd3xxOqWqkyC_Mv19gpvMchVqFiqU0hjvHmt-WA5N4HYKvQrRq4WsORy8OMWsdh1PWI7OLa0yfTZEczxKkxsQHl2WtWBbYuFnHgh8_qYtB2m-gLuU7T4\/s512\/spelling.png\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\"><img fetchpriority=\"high\" decoding=\"async\" border=\"0\" data-original-height=\"512\" data-original-width=\"512\" height=\"320\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjVDrM6DIhC8MmutM-oTGH4-tCla3UDIJwoPvgNjFn2IHIT7CjhUFMGtBbNEpe5UxntDxnA6gkzd3xxOqWqkyC_Mv19gpvMchVqFiqU0hjvHmt-WA5N4HYKvQrRq4WsORy8OMWsdh1PWI7OLa0yfTZEczxKkxsQHl2WtWBbYuFnHgh8_qYtB2m-gLuU7T4\/s320\/spelling.png\" width=\"320\" \/><\/a><\/div><br \/>\n","protected":false},"excerpt":{"rendered":"<p>Spell Checker &amp; Word Counter Tool Check Spelling<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-229","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/shoptips24.com\/tools\/wp-json\/wp\/v2\/pages\/229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shoptips24.com\/tools\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/shoptips24.com\/tools\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/shoptips24.com\/tools\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/shoptips24.com\/tools\/wp-json\/wp\/v2\/comments?post=229"}],"version-history":[{"count":0,"href":"https:\/\/shoptips24.com\/tools\/wp-json\/wp\/v2\/pages\/229\/revisions"}],"wp:attachment":[{"href":"https:\/\/shoptips24.com\/tools\/wp-json\/wp\/v2\/media?parent=229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}