Trying to create a hashtag with multiple Typeahead modals
A Pen by Abdo Hamoud on CodePen.
| <p id="pTest"></p> | |
| <input id="iTest"></input> | |
| <div id="some-test-element">Click me</div> | |
| <div class="search"> | |
| <input id="foo" type="text" value="y u no work" autofocus/> | |
| </div> |
Trying to create a hashtag with multiple Typeahead modals
A Pen by Abdo Hamoud on CodePen.
This is the demo for an article I wrote on CSS-Tricks on how to use a conventional syntax-highlighting library to create an editable input for code that supports syntax highlighting, and acts like a textarea.
The textarea, almost completely transparent except for the caret-color, is positioned on top of the syntax-highlighted block using z-indexes, and the result is synchronised whenever the user enters code.
Due to a suggestion in a comment to the article, I have created a custom element for this technique in this Pen.
A Pen by WebCoder49 on CodePen.
| const { src, dest, watch, series, task } = require('gulp'); | |
| const postcss = require('gulp-postcss'); | |
| const autoprefixer = require('autoprefixer'); | |
| const cssnext = require('cssnext'); | |
| const precss = require('precss'); | |
| const cssnano = require('cssnano'); | |
| const sass = require('gulp-sass'); | |
| const fontMagician = require('postcss-font-magician'); | |
| const rtlcss = require('rtlcss'); | |
| const rename = require('gulp-rename'); |
| [ | |
| { | |
| "flag": "https://twemoji.maxcdn.com/2/svg/1f1e6-1f1e8.svg", | |
| "country": "Ascension Island", | |
| "code": "ac" | |
| }, | |
| { | |
| "flag": "https://twemoji.maxcdn.com/2/svg/1f1e6-1f1e9.svg", | |
| "country": "Andorra", | |
| "code": "ad" |
| import { useCallback, useEffect, useRef, useState } from "react"; | |
| interface UseBroadcastChannelOptions { | |
| name: string; | |
| onMessage?: (event: MessageEvent) => void; | |
| onMessageError?: (event: MessageEvent) => void; | |
| } | |
| interface UseBroadcastChannelReturn<D, P> { | |
| isSupported: boolean; |
| { | |
| "BDT": { | |
| "code": "BDT", | |
| "name": "Bangladeshi Taka", | |
| "symbol": "\u09f3" | |
| }, | |
| "EUR": { | |
| "code": "EUR", | |
| "name": "Euro", | |
| "symbol": "\u20ac" |
| { | |
| "BD": { | |
| "name": "Bangladesh", | |
| "continent": { | |
| "code": "AS", | |
| "name": "Asia" | |
| }, | |
| "code": { | |
| "alpha2": "BD", | |
| "alpha3": "BGD" |
| { | |
| "Australia/Adelaide": { | |
| "country_name": "Australia", | |
| "country_codes": "AU", | |
| "latitude": -34.91667, | |
| "longitude": 138.58333, | |
| "zone_name": "Australia/Adelaide", | |
| "abbreviation": "CAST", | |
| "offset": 34200, |