Ensures that the modal element is not null before attempting to append it to the document body or remove it from its parent node. This prevents potential errors if the modal element is not properly initialized.
Replaces innerHTML usage with Obsidian's safe DOM manipulation methods:
- Line 150: Use createEl() and appendText() for commentary style display
- Lines 159-168: Build usage instructions with createEl() instead of innerHTML
This addresses the Obsidian Review Bot security warning and follows
the official guidelines: https://docs.obsidian.md/Plugins/User+interface/HTML+elements🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix command name from "Clean Up Freewriting" to "Clean up text" to follow Obsidian guidelines (no plugin name in command)
- Replace inline JavaScript styles with CSS classes for better theme compatibility
- Add proper CSS styles in styles.css for textarea and description elements
- Correct license information in README from MIT to GPL v3 to match actual LICENSE file
- Update README documentation to reflect new command name
These changes address common Obsidian plugin review feedback:
- Avoid assigning styles via JavaScript
- Command names should not include plugin name
- Maintain consistency between documentation and actual license
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Adds a plugin to clean up freewriting text using the Anthropic API.
This initial commit introduces core functionality, including:
- API client for interacting with Anthropic's Claude models.
- Service for orchestrating cleanup operations and managing API calls.
- Command for executing the cleanup process on selected text within Obsidian editor.
- Settings tab for configuring the API key, model, prompts, and commentary preferences.
- Type definitions for settings, API requests/responses, and cleanup results.
The plugin provides a command to clean up selected text, apply custom prompts, and optionally generate commentary on the freewriting session.