Getting Started with CodeDiter
CodeDiter is a versatile web code editor designed to make web development more accessible and efficient. Whether you're a beginner learning HTML, CSS, and JavaScript, or an experienced developer looking for a quick prototyping tool, CodeDiter provides all the features you need to bring your ideas to life.
Setting Up Your Workspace
When you first load CodeDiter, you'll see a clean interface with two main sections: the editor area on the left and the preview panel on the right. Here's how to get started:
- Choose your editor mode - Select between "Combined Editor" for a single editor with HTML, CSS, and JavaScript together, or "Separate Editors" for dedicated panels for each language.
- Pick a template - Use the "Examples" dropdown to select a pre-built template, or start from scratch.
- Set your theme - Toggle between light and dark themes using the theme button in the top bar.
Pro Tip
If you're new to web development, start with the "Basic Template" example to understand the fundamental structure of a web page.
Working with the Code Editor
Combined Editor Mode
The Combined Editor provides a single editing space for all your HTML, CSS, and JavaScript code. This is useful when you want to see all your code at once or when working with smaller projects.
In this mode, you can use HTML comments to separate your CSS and JavaScript:
Separate Editors Mode
The Separate Editors mode gives you dedicated panels for HTML, CSS, and JavaScript. This is ideal for larger projects or when you want to focus on a specific language.
In this mode:
- The HTML editor contains your page structure
- The CSS editor contains only your CSS code (without the <style> tags)
- The JS editor contains only your JavaScript code (without the <script> tags)
Key Editor Features
- Syntax highlighting - Code is colored according to its syntax for better readability
- Auto-indentation - Your code is automatically indented for cleaner formatting
- Code completion - The editor suggests HTML tags and attributes as you type
- Line numbers - Helps you navigate and debug your code more easily
Previewing Your Code
CodeDiter provides a real-time preview of your code, so you can see your changes instantly. The preview panel has several features to help you test your code:
Preview Options
- Device simulation - Test how your design looks on different screen sizes (Desktop, Tablet, Mobile)
- Orientation toggle - Switch between portrait and landscape orientation
- Refresh button - Manually refresh the preview if needed
- Full Page button - Open your project in a new tab for a full-screen view
Console Output
The Console tab in the preview panel shows JavaScript outputs and errors. Use console.log() in your JavaScript code to debug values or see the execution flow:
Debugging Tip
When your code isn't working as expected, check the Console tab for error messages that can help identify the problem.
Saving and Sharing Your Work
Exporting Your Project
When you've completed your work, you can export it in several ways:
- Download as HTML - Save your complete project as an HTML file
- Copy Code - Copy all code or individual sections to the clipboard
- Export Individual Files - In Separate Editors mode, export HTML, CSS, and JS files individually
Importing Existing Code
You can also import existing code into CodeDiter:
- Click the "Import" button in the top bar
- Select an HTML file from your computer
- CodeDiter will parse the file and load the HTML, CSS, and JavaScript into the appropriate editors
Best Practices for Saving Work
- Export your work regularly to avoid losing changes
- Use descriptive filenames for your projects
- Consider organizing exported files in project-specific folders
Advanced Features and Tips
Working with External Libraries
You can include external libraries in your projects by adding CDN links in your HTML:
Performance Tip
For complex projects with animations or heavy JavaScript, use the separate editors mode for better organization and performance.