34 lines
1.3 KiB
Markdown
34 lines
1.3 KiB
Markdown
# Project: Obsidian Unicode Text Formatter Plugin
|
||
|
||
## Goal
|
||
Transform selected text in the Obsidian editor into Unicode Mathematical Alphanumeric
|
||
Symbols (Sans-Serif Bold / Italic / Bold-Italic) for use in LinkedIn and Facebook posts.
|
||
|
||
## Architecture
|
||
- TypeScript, Obsidian Plugin API only, zero external dependencies
|
||
- Four files to implement: src/unicode-maps.ts, src/formatter.ts, src/commands.ts, main.ts
|
||
- Build tool: esbuild (already configured in the sample plugin template)
|
||
|
||
## Key Unicode Blocks
|
||
- Sans-Serif Bold uppercase: U+1D5D4–U+1D5ED
|
||
- Sans-Serif Bold lowercase: U+1D5EE–U+1D607
|
||
- Sans-Serif Bold digits: U+1D7EC–U+1D7F5
|
||
- Sans-Serif Italic uppercase: U+1D608–U+1D621
|
||
- Sans-Serif Italic lowercase: U+1D622–U+1D63B
|
||
- Sans-Serif Bold-Italic uppercase: U+1D63C–U+1D655
|
||
- Sans-Serif Bold-Italic lowercase: U+1D656–U+1D66F
|
||
|
||
## Obsidian API used
|
||
- editor.getSelection() / editor.replaceSelection()
|
||
- this.addCommand({ id, name, editorCallback })
|
||
- this.addRibbonIcon()
|
||
|
||
## Commands to register
|
||
1. unicode-formatter:bold "Format as Unicode Bold"
|
||
2. unicode-formatter:italic "Format as Unicode Italic"
|
||
3. unicode-formatter:bold-italic "Format as Unicode Bold Italic"
|
||
|
||
## Testing
|
||
Install to: .obsidian/plugins/unicode-text-formatter/ (main.js + manifest.json)
|
||
Enable in: Obsidian → Settings → Community Plugins
|