Conversions to TiddlyWiki.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2021-08-07 17:14:57 -05:00
parent 479a15d2c3
commit 78ec41d5b4
1 changed files with 13 additions and 2 deletions

View File

@ -23,6 +23,16 @@ HedgeDoc class >> newDefault [
defaultServer.
]
{ #category : #accessing }
HedgeDoc >> asTiddler [
self url ifNil: [ ^ self ].
^ Tiddler new
title: self url segments first;
text: (self contents ifNil: [ self retrieveContents]);
type: 'text/x-markdown';
created: DateAndTime now asString.
]
{ #category : #accessing }
HedgeDoc >> contents [
^ contents
@ -61,10 +71,11 @@ HedgeDoc >> pad: anObject [
pad := anObject
]
{ #category : #'as yet unclassified' }
{ #category : #accessing }
HedgeDoc >> retrieveContents [
self url ifNil: [ ^ self ].
^ (self url addPathSegment: 'download') retrieveContents
self contents: (self url addPathSegment: 'download') retrieveContents.
^ self contents.
]
{ #category : #'as yet unclassified' }