readme foo
This commit is contained in:
parent
03955fdddd
commit
074a86b707
3 changed files with 31 additions and 26 deletions
20
README.md
20
README.md
|
@ -3,15 +3,25 @@
|
|||
<p>
|
||||
Aren't you tired of distracting social media platforms?
|
||||
So many buttons and advertising makes a simple task of sending notes ot your
|
||||
friends very draining. </p>
|
||||
friends very draining. This is a simple WYSIWYM style rich text editor
|
||||
built with <a href="https://prosemirror.net/">ProseMirror</a> </p>
|
||||
|
||||
<p> You can use a next generation social media protocol to transform
|
||||
your personal website into a micro blog client. Using WYSIWYG style
|
||||
editor builders like ProseMirror, you can render a simple rich
|
||||
text editor for visitors to compose notes with. You can type
|
||||
out a note and post it to a set of relays. </p>
|
||||
|
||||
<p>This is an installable personal website that is accessible through chrome-based and firefox browsers. The website is built with PWA Builder and Lit Web Components. It utilizes the Nostr
|
||||
protocol to connect to my personal relay for fetching kind 0 and 1 notes AKA profile metadata
|
||||
and short text notes.</p>
|
||||
|
||||
|
||||
<p>This is an installable personal website that is accessisible through chrome-based and firefox browsers. The website is built with PWA Builder and Lit Web Components. It utilizes the Nostr
|
||||
protocol to connect to my personal relay for fetching recent notes as well as kind 0 notes AKA profile metadata.</p>
|
||||
|
||||
<p>If you're on safari browsers, try visiting the webpage then tapping on the arrow
|
||||
pointing up in the bottom toolbar. Scroll down a bit to tap on "Add to Home Screen".
|
||||
|
||||
If you're on a chromium-based browser you should be able to do the same</p>
|
||||
If you're on a chromium-based browser you should be able to do the same.</p>
|
||||
|
||||
|
||||
|
||||
|
@ -19,7 +29,7 @@ If you're on a chromium-based browser you should be able to do the same</p>
|
|||
|
||||
<ul>
|
||||
<li>refactor</li>
|
||||
<li>refactor</li>
|
||||
<li>dropdown menu a la Medium</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -28,7 +28,10 @@ export function createMenuPlugin(customSchema: any) {
|
|||
content: menuContent,
|
||||
floating: true,
|
||||
});
|
||||
console.log('Creating menu plugin');
|
||||
|
||||
return new Plugin({
|
||||
key: menuPluginKey
|
||||
})
|
||||
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ import { toggleMark } from 'prosemirror-commands';
|
|||
import {undo, redo, history} from 'prosemirror-history'
|
||||
import { baseKeymap } from 'prosemirror-commands';
|
||||
|
||||
import { menuBar } from 'prosemirror-menu';
|
||||
import {createMenuPlugin} from '../../components/menu-plugin'
|
||||
|
||||
|
||||
|
@ -127,6 +126,9 @@ const customKeymap = keymap({
|
|||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
@customElement('app-write')
|
||||
export class AppWrite extends LitElement {
|
||||
@property({ type: String }) placeholder: string = 'Compose your note...';
|
||||
|
@ -163,7 +165,7 @@ export class AppWrite extends LitElement {
|
|||
this.initializeEditor()
|
||||
|
||||
}
|
||||
private initializeEditor() {
|
||||
private initializeEditor() {
|
||||
if (!this.editorContainer) {
|
||||
console.error('Editor container not here');
|
||||
return
|
||||
|
@ -176,9 +178,8 @@ export class AppWrite extends LitElement {
|
|||
|
||||
const state = EditorState.create({
|
||||
doc,
|
||||
plugins: [menuPlugin,
|
||||
|
||||
|
||||
plugins: [
|
||||
menuPlugin,
|
||||
history(),
|
||||
keymap({
|
||||
'Mod-z': undo,
|
||||
|
@ -192,7 +193,6 @@ export class AppWrite extends LitElement {
|
|||
|
||||
|
||||
|
||||
const selection = state.selection;
|
||||
let view = new EditorView(this.editorContainer, {
|
||||
state,
|
||||
dispatchTransaction(transaction) {
|
||||
|
@ -219,6 +219,7 @@ export class AppWrite extends LitElement {
|
|||
super.disconnectedCallback();
|
||||
if (this.editorView) {
|
||||
this.editorView.destroy();
|
||||
this.editorView = null!
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -236,22 +237,13 @@ export class AppWrite extends LitElement {
|
|||
<h2>Editor Demo</h2>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Aren't you tired of distracting interfaces on mainstream blogging platforms?
|
||||
So many buttons and advertising makes a single task very draining. This is
|
||||
a platform-agnostic browser application that is installable to any homescreen! </p>
|
||||
<p>
|
||||
You can use a protocol to transform your personal website into
|
||||
a micro blog client. Using WYSIWYG style editor builders like
|
||||
ProseMirror, you can render a simple rich text editor for visitors to compose
|
||||
notes with. You can type out a note and post it to a set of relays.
|
||||
</p>
|
||||
|
||||
|
||||
<h3>Basic Intructions</h3>
|
||||
<p>click inside the white text area to place your curson there.
|
||||
You can type and press enter to go to the next line down.
|
||||
<p>click inside the white text area to highlight with your curson.
|
||||
You can type and press enter to insert a new block below.
|
||||
<br>
|
||||
Click and hold down to select a piece of text, then CTRL+X to cut and
|
||||
CTRL+V to paste.</p>
|
||||
Highlight a piece of text, then CTRL+X to cut and CTRL+V to paste.</p>
|
||||
|
||||
</sl-card>
|
||||
<sl-card>
|
||||
|
|
Loading…
Reference in a new issue