Skip to content

Instantly share code, notes, and snippets.

import {Controller} from '@hotwired/stimulus'
import {Editor} from "@tiptap/core"
import {Mention} from "@tiptap/extension-mention";
import StarterKit from "@tiptap/starter-kit"
export default class extends Controller {
static targets = ['input', 'suggestions']
connect() {
this.editor = new Editor({
<html>
<head>
<style>
.box-that-changes-color {
height: 1rem;
width: 1rem;
background: red;
}
@media (min-width: 768px) {