Coder Social home page Coder Social logo

marifervl / xml-editor Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 85 KB

This project is an XML editor with syntax highlighting, collapse/expand functionality for XML elements, and both manual and automatic save options. The user interface features modern styling, including a sleek file input design and visually appealing buttons. The automatic save option allows engineers to enable real-time saving...

JavaScript 40.55% HTML 35.15% CSS 24.30%
css3 editor html5 javascript tailwind xml

xml-editor's Introduction

XML Editor v1.3.0

Project Description

The XML Editor project provides a user-friendly interface for creating and editing XML documents. It leverages the CodeMirror library for syntax highlighting and offers additional features for managing XML files. The editor supports loading sample files, creating new follow-ups, moving follow-ups, and saving the edited content.

Project Structure

Files

  • index.html: The main HTML file containing the structure of the editor interface.
  • styles.css: The stylesheet with global styling for the entire page.
  • editor.js: JavaScript file responsible for initializing the XML editor and handling file operations.

Dependencies

  • No internet connection is required for dependencies, as Codemirror has been removed from npm. Instead, the necessary files are included in the project:

    • codemirror/brace-fold.min.js
    • codemirror/codemirror.min.css
    • codemirror/codemirror.min.js
    • codemirror/dracula.min.css
    • codemirror/foldcode.min.js
    • codemirror/foldgutter.min.css
    • codemirror/foldgutter.min.js
    • codemirror/xml-fold.min.js
    • codemirror/xml.min.js

Project Tree

📦xml-editor ┣ 📂.git ┣ 📜editor.js ┣ 📜index.html ┣ 📜package-lock.json ┣ 📜package.json ┣ 📜README.md ┣ 📜sample.xml ┣ 📂codemirror ┃ ┣ 📜brace-fold.min.js ┃ ┣ 📜codemirror.min.css ┃ ┣ 📜codemirror.min.js ┃ ┣ 📜dracula.min.css ┃ ┣ 📜foldcode.min.js ┃ ┣ 📜foldgutter.min.css ┃ ┣ 📜foldgutter.min.js ┃ ┣ 📜xml-fold.min.js ┃ ┗ 📜xml.min.js ┗ 📜styles.css

Getting Started

To use the XML Editor locally, follow these steps:

  1. Clone the Repository:

    git clone https://github.com/MariferVL/xml-editor.git
  2. Navigate to the Project Directory:

    cd xml-editor
  3. Open the Editor:

    • Open index.html in your preferred web browser.

Editor Features

1. Load Sample Files

  • Select a sample file from the dropdown in the header to load its content into the editor.

2. Save Content

  • Click the "Guardar" (Save) button to save the current content. The saved file will be named either based on the selected file or as "edited.xml" if it's a new file.

3. CodeMirror Editor Features

  • Syntax Highlighting: XML code is highlighted for better readability.
  • Line Numbers: Line numbers are displayed for easy navigation.
  • AutoClose Tags: Automatically closes XML tags for improved code structure.
  • Foldable Code Blocks: Use 'Ctrl-Q' to fold and unfold code blocks, enhancing code organization.
  • Copy with Empty Selection: Allows copying the entire line when no specific text is selected.

4. Styling

  • The editor interface is designed with a clean and responsive layout, utilizing a dark theme based on the Dracula color scheme. Styles include buttons, labels, dropdowns, and the CodeMirror editor.

Contributing

Feel free to contribute to the project by submitting issues or pull requests on Github.

License

This project is licensed under the MIT License - see the LICENSE file for details.

xml-editor's People

Contributors

marifervl avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.