{"id":671,"date":"2023-03-03T04:07:31","date_gmt":"2023-03-03T04:07:31","guid":{"rendered":"https:\/\/www.toolkit.keywordfinder.us\/?page_id=671"},"modified":"2023-03-03T04:07:31","modified_gmt":"2023-03-03T04:07:31","slug":"text-difference-checker-tool","status":"publish","type":"page","link":"https:\/\/tools.billionsideas.com\/es\/text-difference-checker-tool\/","title":{"rendered":"Text Difference Checker Tool"},"content":{"rendered":"<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"UTF-8\">\n    <title>Text Difference Checker Tool<\/title>\n    <style>\n      \/* Styles for the difference checker container *\/\n      #difference-checker {\n        margin: 20px auto;\n        width: 100%;\n        max-width: 800px;\n        background-color: #fff;\n        border: 1px solid #ddd;\n        padding: 20px;\n      }\n\n      \/* Styles for the text input areas *\/\n      #text1, #text2 {\n        width: 100%;\n        height: 150px;\n        border: 1px solid #ddd;\n        margin-bottom: 10px;\n        padding: 10px;\n      }\n\n      \/* Styles for the button *\/\n      #compare-btn {\n        background-color: #4CAF50;\n        color: #fff;\n        border: none;\n        padding: 10px 20px;\n        font-size: 16px;\n        cursor: pointer;\n      }\n\n      \/* Styles for the button on hover *\/\n      #compare-btn:hover {\n        background-color: #3e8e41;\n      }\n\n      \/* Styles for the difference highlight *\/\n      .difference {\n        background-color: #ffcccb;\n      }\n    <\/style>\n  <\/head>\n  <body>\n    <div id=\"difference-checker\">\n      <h1>Text Difference Checker Tool<\/h1>\n      <p>Enter your two texts or lists below and click the &#8220;Compare&#8221; button to find the differences between them.<\/p>\n      <form action=\"\">\n        <label for=\"text1\">Text 1:<\/label>\n        <textarea id=\"text1\" name=\"text1\" required><\/textarea>\n        <label for=\"text2\">Text 2:<\/label>\n        <textarea id=\"text2\" name=\"text2\" required><\/textarea>\n        <button type=\"button\" id=\"compare-btn\" onclick=\"compareText()\">Compare<\/button>\n      <input type=\"hidden\" name=\"trp-form-language\" value=\"es\"\/><\/form>\n      <hr>\n      <div id=\"result\"><\/div>\n    <\/div>\n    <script>\n      function compareText() {\n        \/\/ Get the text from the input fields\n        var text1 = document.getElementById(\"text1\").value.trim();\n        var text2 = document.getElementById(\"text2\").value.trim();\n\n        \/\/ Split the text into lines\n        var lines1 = text1.split(\"\\n\");\n        var lines2 = text2.split(\"\\n\");\n\n        \/\/ Initialize the result variable\n        var result = \"\";\n\n        \/\/ Compare the lines and highlight the differences\n        for (var i = 0; i < Math.max(lines1.length, lines2.length); i++) {\n          if (lines1[i] !== lines2[i]) {\n            result += '<span class=\"difference\">' + (i + 1) + '. ' + (lines1[i] || '') + '<\/span>\\n';\n            result += '<span class=\"difference\">' + (i + 1) + '. ' + (lines2[i] || '') + '<\/span>\\n';\n          } else {\n            result += (i + 1) + '. ' + lines1[i] + '\\n';\n          }\n        }\n\n        \/\/ Display the result in the result container\n        document.getElementById(\"result\").innerHTML = '<pre>' + result + '<\/pre>';\n      }\n    <\/script>\n  <\/body>\n<\/html>\n\n<style>\n\n<\/style>\n\n<script>\n\n<\/script>","protected":false},"excerpt":{"rendered":"<p>Text Difference Checker Tool Text Difference Checker Tool Enter your two texts or lists below and click the &#8220;Compare&#8221; button to find the differences between them. Text 1: Text 2: Compare<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","footnotes":""},"class_list":["post-671","page","type-page","status-publish"],"taxonomy_info":[],"featured_image_src_large":false,"author_info":{"display_name":"Billions Ideas","author_link":"https:\/\/tools.billionsideas.com\/es\/author\/loginbillionsideas-com\/"},"comment_info":0,"jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tools.billionsideas.com\/es\/wp-json\/wp\/v2\/pages\/671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tools.billionsideas.com\/es\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/tools.billionsideas.com\/es\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/tools.billionsideas.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tools.billionsideas.com\/es\/wp-json\/wp\/v2\/comments?post=671"}],"version-history":[{"count":0,"href":"https:\/\/tools.billionsideas.com\/es\/wp-json\/wp\/v2\/pages\/671\/revisions"}],"wp:attachment":[{"href":"https:\/\/tools.billionsideas.com\/es\/wp-json\/wp\/v2\/media?parent=671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}