Skip to content

BYxarek/formatter-html-css-js-php-json-xml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Formatter Description

This HTML code creates a web page with code formatting functionality. Here are the main components and their functions:

HTML:

  • Creates the structure of the page with the title "Code Formatter".
  • Includes a text area for code input and buttons for formatting and copying the code.

CSS:

  • Defines styles for page elements, including the container, buttons, and notifications.

CodeMirror:

  • Used to create a code editor with syntax highlighting and line numbers.
  • Various modes are connected to support HTML, CSS, JavaScript, PHP, and other languages.

JS-Beautify:

  • A library for code formatting.
  • Used for formatting HTML, CSS, JavaScript, PHP, and JSON.

JavaScript:

  • Initializes the CodeMirror editor.
  • The formatCode() function formats the entered code depending on its type.
  • The copyToClipboard() function copies the formatted code to the clipboard and shows a notification.

How to use:

  • Enter the code in the text area.
  • Click the "Format" button to format the code.
  • The formatted code will appear below.
  • Click the "Copy Code" button to copy the formatted code to the clipboard.

About

Online formatter script: html, css, php, js, json, xml

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published