This file contains hidden or 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
import { Extension } from '@tiptap/core' | |
import { PluginKey, Plugin } from 'prosemirror-state'; | |
function nodeEqualsType({ types, node }) { | |
return (Array.isArray(types) && types.includes(node.type)) || node.type === types | |
} | |
/** | |
* Extension based on: | |
* - https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/extensions/TrailingNode.js |
This file contains hidden or 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
import Quill from 'quill'; | |
const Module = Quill.import('core/module'); | |
const BlockEmbed = Quill.import('blots/block/embed'); | |
class ImageBlot extends BlockEmbed { | |
static blotName = 'image'; | |
static tagName = ['figure', 'image']; | |
static create(value) { |
This file contains hidden or 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
# First, we need to find our device. BEFORE inserting your USB drive, run the | |
# following: | |
diskutil list | |
# This will output a bunch of info about all of the disk drives connected to | |
# your Mac. Each entry will have a header in the form "/dev/diskX", where X is | |
# some number starting at 0. Now, insert your USB drive and run the command | |
# again. You should see a new entry. Make note of the name (ie, /dev/diskX). | |
diskutil list |