Skip to content

Instantly share code, notes, and snippets.

View tdak's full-sized avatar
🏠
Working from home

tdak

🏠
Working from home
View GitHub Profile
@dhairyagabha
dhairyagabha / rails-add-underline-superscript-subscript-to-trix-editor.md
Last active March 25, 2024 23:09
Rails & Trix: Add Underline, Superscript, and Subscript

Rails & Trix: Add Underline, Superscript, and Subscript

This guide will walk you through adding some extra features such as the ability to underline your text, or enhance your content by adding superscripts or subscripts for annotations or Math equations.

Prerequisites: Instruction guide assumes that you have created a Rails application and installed ActionText.

What will you learn:

@tdak
tdak / ajax_frame.js
Last active December 6, 2020 20:47
Turbolinks-Frame implementation for Rails, javascript and A Controller Concern
export class AjaxFrame {
updateAjaxFrame(e_id, load_turbolinks = true) {
var element = document.getElementById(e_id)
if (!element) {
return
}
var url = element.getAttribute("src")