Skip to content

Instantly share code, notes, and snippets.

View BroJenuel's full-sized avatar
Working from home

Jenuel Oras Ganawed BroJenuel

Working from home
View GitHub Profile
BroJenuel / tiptapGetCursirPosition.js
Created June 7, 2023 02:07
This Gist is how to get the cursor position.
View tiptapGetCursirPosition.js
new Editor({
onTransaction: ({ state }) => {
BroJenuel /
Created October 6, 2021 07:08 — forked from whitingx/
Complete List of HTML Meta Tags

Copied from

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
BroJenuel / presstab.js
Last active September 22, 2020 02:52
This is a function that will be called when pressing tab when writing inside a text area element in html. This will create 4 spaces just like a tab.
View presstab.js
$('#textarea').keydown(function (e) {
var keyCode = e.keyCode || e.which;
if (keyCode === $.ui.keyCode.TAB) {
const TAB_SIZE = 4;
// The one-liner that does the magic
document.execCommand('insertText', false, ' '.repeat(TAB_SIZE));