update documentation

This commit is contained in:
Philipp Kunz 2024-04-20 23:18:47 +02:00
parent ef9759657c
commit 925c2a7b74
4 changed files with 139 additions and 32 deletions

View File

@ -2,17 +2,31 @@
"gitzone": {
"projectType": "wcc",
"module": {
"githost": "gitlab.com",
"githost": "code.foss.global",
"gitscope": "designestate",
"gitrepo": "dees-editor",
"description": "an advanced editor for markdown documents based on monaco.",
"description": "An advanced editor for markdown documents based on Monaco editor with integrated terminal and markdown preview features.",
"npmPackagename": "@design.estate/dees-editor",
"license": "MIT",
"projectDomain": "design.estate"
"projectDomain": "design.estate",
"keywords": [
"markdown editor",
"Monaco editor",
"web components",
"typescript",
"custom elements",
"terminal",
"markdown preview",
"code editing",
"syntax highlighting"
]
}
},
"npmci": {
"npmGlobalTools": [],
"npmAccessLevel": "public"
},
"tsdoc": {
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
}
}

View File

@ -2,7 +2,7 @@
"name": "@design.estate/dees-editor",
"version": "1.0.75",
"private": false,
"description": "an advanced editor for markdown documents based on monaco.",
"description": "An advanced editor for markdown documents based on Monaco editor with integrated terminal and markdown preview features.",
"main": "dist_ts_web/index.js",
"typings": "dist_ts_web/index.d.ts",
"type": "module",
@ -47,5 +47,16 @@
],
"browserslist": [
"last 1 Chrome versions"
],
"keywords": [
"markdown editor",
"Monaco editor",
"web components",
"typescript",
"custom elements",
"terminal",
"markdown preview",
"code editing",
"syntax highlighting"
]
}
}

1
readme.hints.md Normal file
View File

@ -0,0 +1 @@

135
readme.md
View File

@ -1,37 +1,118 @@
# @designestate/dees-editor
# @design.estate/dees-editor
an advanced editor for markdown documents based on monaco.
## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@design.estate/dees-editor)
* [gitlab.com (source)](https://gitlab.com/designestate/dees-editor)
* [github.com (source mirror)](https://github.com/designestate/dees-editor)
* [docs (typedoc)](https://designestate.gitlab.io/dees-editor/)
## Install
To install `@design.estate/dees-editor`, you need to run the following command using npm or Yarn. Make sure you have Node.js installed on your system before you proceed.
## Status for master
Status Category | Status Badge
-- | --
GitLab Pipelines | [![pipeline status](https://gitlab.com/designestate/dees-editor/badges/master/pipeline.svg)](https://lossless.cloud)
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/designestate/dees-editor/badges/master/coverage.svg)](https://lossless.cloud)
npm | [![npm downloads per month](https://badgen.net/npm/dy/@design.estate/dees-editor)](https://lossless.cloud)
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/designestate/dees-editor)](https://lossless.cloud)
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@design.estate/dees-editor)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@design.estate/dees-editor)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@design.estate/dees-editor)](https://lossless.cloud)
```bash
npm install @design.estate/dees-editor
# or if you prefer Yarn
yarn add @design.estate/dees-editor
```
## Usage
This guide walks you through the usage of `@design.estate/dees-editor`, an advanced editor for markdown documents based on Monaco Editor. This editor not only allows for high customization but also enhances your markdown editing with the robust features of Monaco Editor.
Use TypeScript for best in class intellisense
### Integrating `@design.estate/dees-editor` in Your Project
First, ensure you have installed `@design.estate/dees-editor` as described in the installation section.
## Contribution
#### Setting Up Your Project
Create a TypeScript file (e.g. `app.ts`) and import necessary functionalities using ESM syntax:
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
```typescript
import { DeesEditor, DeesTerminal, DeesEditorMarkdown, DeesEditorMarkdownOutlet } from '@design.estate/dees-editor';
```
For further information read the linked docs at the top of this readme.
### Displaying the Markdown Editor
To display the markdown editor in your web application, you will need to incorporate it into your HTML structure. Typically, you can use custom element tags provided by the library. Here's a simple example:
## Legal
> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
#### HTML Structure
Add the following HTML structure to your application's main HTML file (e.g., `index.html`):
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Markdown Editor</title>
<script type="module" src="./app.ts"></script>
</head>
<body>
<dees-editor></dees-editor>
</body>
</html>
```
#### Initializing the Editor
Within your `app.ts` file, initialize the markdown editor with desired options:
```typescript
const editorElement = document.querySelector('dees-editor');
if (editorElement) {
editorElement.language = 'markdown'; // Set the language to markdown
editorElement.content = '# Markdown Editor\n\nStart typing your markdown content here...'; // Initial content
}
```
### Advanced Usage
`@design.estate/dees-editor` offers an advanced markdown editor that leverages the Monaco Editor. This means you can utilize Monaco's extensive API for further customization and functionality enhancement.
#### Configuring the Editor
The editor can be tailored to meet your needs, such as theming, read-only mode, and more. Explore Monaco's [`IStandaloneEditorConstructionOptions`](https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.IStandaloneEditorConstructionOptions.html) for all available configurations.
Example - Setting Dark Theme and Read-Only Mode:
```typescript
(async () => {
const editorInstance = await editorElement.editorDeferred.promise; // Wait for the editor to initialize
editorInstance.updateOptions({
theme: 'vs-dark', // Set theme to dark
readOnly: true // Make the editor read-only
});
})();
```
#### Integrating Terminal Emulator
`@design.estate/dees-editor` also includes a powerful terminal emulator, `DeesTerminal`, which can be embedded alongside your editor:
```html
<dees-terminal></dees-terminal>
```
And in your TypeScript file:
```typescript
const terminalElement = document.querySelector('dees-terminal');
if (terminalElement) {
// Initialize terminal with options or use it directly
}
```
#### Creating a Live Markdown Preview
`@design.estate/dees-editor` facilitates creating live markdown previews. Utilize `DeesEditorMarkdown` for binding the editor with a live preview outlet.
```html
<dees-editormarkdown></dees-editormarkdown>
```
This component divides the viewport into an editor pane and a live preview pane. As you type in the editor, the markdown content automatically renders in the live preview.
### Conclusion
`@design.estate/dees-editor` is a feature-rich markdown editor built on top of Monaco Editor, offering extensive customizability and advanced features such as a terminal emulator and live markdown preview. Its integration into your project is straightforward, whether embedding the editor directly into your webpage or leveraging its components for advanced functionality. The versatility of Monaco Editor ensures that your markdown documentation needs are met with efficiency and style.
## License and Legal Information
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
### Trademarks
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
### Company Information
Task Venture Capital GmbH
Registered at District court Bremen HRB 35230 HB, Germany
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.