File tree 4 files changed +10
-27
lines changed
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 {
38
38
}
39
39
}
40
40
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
- }
56
41
57
42
export default class MyPlugin extends Plugin {
58
43
settings : MyPluginSettings ;
59
44
60
45
// List of coders
61
- coders : Coder [ ] = [ new Base64Encoder ( ) , new Base64Decoder ( ) ] ;
46
+ coders : Coder [ ] = [ new Base64Encoder ( ) ] ;
62
47
63
48
async onload ( ) {
64
49
this . registerMarkdownCodeBlockProcessor ( 'transform-text-base64' , this . processTextToBase64 ) ;
65
- this . registerMarkdownCodeBlockProcessor ( 'transform-base64-text' , this . processBase64ToText ) ;
50
+ // this.registerMarkdownCodeBlockProcessor('transform-base64-text', this.processBase64ToText);
66
51
}
67
52
68
53
// function to get a coder by from and to types
Original file line number Diff line number Diff line change 1
1
{
2
- "id" : " obsidian-encoder-decoder -plugin" ,
2
+ "id" : " obsidian-coder -plugin" ,
3
3
"name" : " Encoder/Decoder Plugin" ,
4
4
"version" : " 1.0.0" ,
5
5
"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" ,
10
8
"isDesktopOnly" : false
11
9
}
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " obsidian-sample -plugin" ,
2
+ "name" : " obsidian-coder -plugin" ,
3
3
"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. " ,
5
5
"main" : " main.js" ,
6
6
"scripts" : {
7
7
"dev" : " node esbuild.config.mjs" ,
8
8
"build" : " tsc -noEmit -skipLibCheck && node esbuild.config.mjs production" ,
9
9
"version" : " node version-bump.mjs && git add manifest.json versions.json"
10
10
},
11
11
"keywords" : [],
12
- "author" : " " ,
12
+ "author" : " Rudi Häusler " ,
13
13
"license" : " MIT" ,
14
14
"devDependencies" : {
15
15
"@types/node" : " ^16.11.6" ,
You can’t perform that action at this time.
0 commit comments