Hi, I am very new to ProseMirror. I was trying to get the following working “Replace typed text with bullet lists”
I was able to replace text with paragraphs:
import { schema } from "prosemirror-schema-basic"
import { EditorState } from "prosemirror-state"
import { EditorView } from "prosemirror-view"
import './style.css';
let state = EditorState.create({ schema })
let view = new EditorView(document.body, {
state,
dispatchTransaction(transaction) {
let n = schema.node("paragraph")
transaction.selection.replaceWith(transaction, n)
let newState = view.state.apply(transaction)
view.updateState(newState)
}
})
window.view = view;
I want to use a “bullet_list” type of node instead of paragraph. I was wondering if this possible?