refactor: prepare plugin for Obsidian community submission

- 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>
This commit is contained in:
Jarvis committed 2025-09-20 12:34:09 +02:00
1 parent aa4193410c
commit 809fce9c89
4 files changed
+27 -21

No files matched your search

+3 -10
View File
@@ -90,8 +90,7 @@ export class FreewritingCleanupSettingTab extends PluginSettingTab {
// Style the textarea
textArea.inputEl.rows = 4;
textArea.inputEl.style.width = '100%';
textArea.inputEl.style.minHeight = '100px';
textArea.inputEl.addClass('freewriting-cleanup-textarea');
});
// MARK: - Commentary Configuration
@@ -142,18 +141,12 @@ export class FreewritingCleanupSettingTab extends PluginSettingTab {
// Style the textarea
textArea.inputEl.rows = 3;
textArea.inputEl.style.width = '100%';
textArea.inputEl.style.minHeight = '80px';
textArea.inputEl.addClass('freewriting-cleanup-textarea-small');
});
} else {
// Show the current preset for reference
const presetText = COMMENTARY_PRESETS[this.plugin.settings.commentaryStyle as Exclude<CommentaryStyle, 'custom'>];
const descDiv = containerEl.createDiv({ cls: 'setting-item-description' });
descDiv.style.marginLeft = '0';
descDiv.style.padding = '10px';
descDiv.style.backgroundColor = 'var(--background-secondary)';
descDiv.style.borderRadius = '5px';
descDiv.style.fontSize = '0.9em';
const descDiv = containerEl.createDiv({ cls: 'setting-item-description freewriting-cleanup-description' });
descDiv.innerHTML = `<strong>Selected style:</strong> ${presetText}`;
}
}