File tree Expand file tree Collapse file tree 4 files changed +10
-27
lines changed Expand file tree Collapse file tree 4 files changed +10
-27
lines changed Original file line number Diff line number Diff line change @@ -38,31 +38,16 @@ class Base64Encoder implements Coder {
3838 }
3939}
4040
41- class Base64Decoder implements Coder {
42- from :string ;
43- to : string ;
44-
45- constructor ( ) {
46- this . from = "base64" ;
47- this . to = "text" ;
48- }
49-
50- transform ( text :string ) : string {
51- //let utf8Decode = new TextDecoder();
52- //return utf8Decode.decode(base64js.toByteArray(text));
53- return "" ;
54- }
55- }
5641
5742export default class MyPlugin extends Plugin {
5843 settings : MyPluginSettings ;
5944
6045 // List of coders
61- coders : Coder [ ] = [ new Base64Encoder ( ) , new Base64Decoder ( ) ] ;
46+ coders : Coder [ ] = [ new Base64Encoder ( ) ] ;
6247
6348 async onload ( ) {
6449 this . registerMarkdownCodeBlockProcessor ( 'transform-text-base64' , this . processTextToBase64 ) ;
65- this . registerMarkdownCodeBlockProcessor ( 'transform-base64-text' , this . processBase64ToText ) ;
50+ // this.registerMarkdownCodeBlockProcessor('transform-base64-text', this.processBase64ToText);
6651 }
6752
6853 // function to get a coder by from and to types
Original file line number Diff line number Diff line change 11{
2- "id" : " obsidian-encoder-decoder -plugin" ,
2+ "id" : " obsidian-coder -plugin" ,
33 "name" : " Encoder/Decoder Plugin" ,
44 "version" : " 1.0.0" ,
55 "minAppVersion" : " 0.15.0" ,
6- "description" : " Demonstrates some of the capabilities of the Obsidian API." ,
7- "author" : " Obsidian" ,
8- "authorUrl" : " https://obsidian.md" ,
9- "fundingUrl" : " https://obsidian.md/pricing" ,
6+ "description" : " This plugin converts texts into base64 and other formats." ,
7+ "author" : " Rudi Häusler" ,
108 "isDesktopOnly" : false
119}
Original file line number Diff line number Diff line change 11{
2- "name" : " obsidian-sample -plugin" ,
2+ "name" : " obsidian-coder -plugin" ,
33 "version" : " 1.0.0" ,
4- "description" : " This is a sample plugin for Obsidian (https://obsidian.md) " ,
4+ "description" : " This plugin converts texts into base64 and other formats. " ,
55 "main" : " main.js" ,
66 "scripts" : {
77 "dev" : " node esbuild.config.mjs" ,
88 "build" : " tsc -noEmit -skipLibCheck && node esbuild.config.mjs production" ,
99 "version" : " node version-bump.mjs && git add manifest.json versions.json"
1010 },
1111 "keywords" : [],
12- "author" : " " ,
12+ "author" : " Rudi Häusler " ,
1313 "license" : " MIT" ,
1414 "devDependencies" : {
1515 "@types/node" : " ^16.11.6" ,
You can’t perform that action at this time.
0 commit comments