-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
270 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Internal Documentation | ||
|
||
WIP documentation of Mark Text. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# Editor | ||
|
||
TBD | ||
|
||
## Internal | ||
|
||
### Raw markdown document | ||
|
||
```typescript | ||
interface IMarkdownDocumentRaw | ||
{ | ||
// Markdown content | ||
markdown: string, | ||
// Filename | ||
filename: string, | ||
// Full path (may be empty?) | ||
pathname: string, | ||
|
||
// Indicates whether the document is UTF8 or UTF8-DOM encoded. | ||
isUtf8BomEncoded: boolean, | ||
// "lf" or "crlf" | ||
lineEnding: string, | ||
// Convert document ("lf") to `lineEnding` when saving | ||
adjustLineEndingOnSave: boolean | ||
|
||
// Whether the document has mixed line endings (lf and crlf) and was converted to lf. | ||
isMixedLineEndings: boolean | ||
|
||
// TODO(refactor:renderer/editor): Remove this entry! This should be loaded separately if needed. | ||
textDirection: boolean | ||
} | ||
``` | ||
|
||
### Markdowm document | ||
|
||
A markdown document (`IMarkdownDocument`) represent a file. | ||
|
||
```typescript | ||
interface IMarkdownDocument | ||
{ | ||
// Markdown content | ||
markdown: string, | ||
// Filename | ||
filename: string, | ||
// Full path (may be empty?) | ||
pathname: string, | ||
|
||
// Indicates whether the document is UTF8 or UTF8-DOM encoded. | ||
isUtf8BomEncoded: boolean, | ||
// "lf" or "crlf" | ||
lineEnding: string, | ||
// Convert document ("lf") to `lineEnding` when saving | ||
adjustLineEndingOnSave: boolean | ||
} | ||
``` | ||
|
||
### File State | ||
|
||
Internal state of a markdown document. `IMarkdownDocument` is used to create a `IFileState`. | ||
|
||
```typescript | ||
interface IDocumentState | ||
{ | ||
isSaved: boolean, | ||
pathname: string, | ||
filename: string, | ||
markdown: string, | ||
isUtf8BomEncoded: boolean, | ||
lineEnding: string, | ||
adjustLineEndingOnSave: boolean, | ||
textDirection: string, | ||
history: { | ||
stack: Array<any>, | ||
index: number | ||
}, | ||
cursor: any, | ||
wordCount: { | ||
paragraph: number, | ||
word: number, | ||
character: number, | ||
all: number | ||
}, | ||
searchMatches: { | ||
index: number, | ||
matches: Array<any>, | ||
value: string | ||
} | ||
} | ||
``` | ||
|
||
### ... | ||
|
||
TBD | ||
|
||
## View | ||
|
||
TBD | ||
|
||
### Side Bar | ||
|
||
TBD | ||
|
||
### Tabs | ||
|
||
TBD | ||
|
||
### Document | ||
|
||
TBD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.