Skip to content

Instantly share code, notes, and snippets.

View marat-dimaev's full-sized avatar

Marat Dimaev marat-dimaev

View GitHub Profile
@slava-vishnyakov
slava-vishnyakov / readme.md
Last active June 9, 2025 07:55
How to upload images with TipTap editor
  1. Create a file Image.js from the source below (it is almost a copy of Image.js from tiptap-extensions except that it has a constructor that accepts uploadFunc (function to be called with image being uploaded) and additional logic if(upload) { ... } else { ... previous base64 logic .. } in the new Plugin section.
import {Node, Plugin} from 'tiptap'
import {nodeInputRule} from 'tiptap-commands'

/**
 * Matches following attributes in Markdown-typed image: [, alt, src, title]
 *
@meysampg
meysampg / dd.php
Created July 8, 2017 03:10
define `dd` function for Yii2
<?php
// add anywhere after `require(__DIR__ . '/../vendor/autoload.php');` on index.php file
function dd($v) {
\yii\helpers\VarDumper::dump($v, 10, true);
exit();
}