All Questions
Tagged with text javascript
2,175
questions
0
votes
0
answers
24
views
Trying to truncate text on smaller screens, but the common solutions don't work
This code works fine, only when the_title() text is longer and the window is small, the text wraps to the next line:
<div class="metabox metabox--position-up metabox--with-home-link">
...
1
vote
1
answer
48
views
Regex for nested tag detection
I have a document generation application that handles tag replacement, I use a regular expression to detect said tags. These tags can be of multiple types, for the sake of the problem let's take into ...
0
votes
0
answers
35
views
Javascript text compression
I have tried "pako" and lz-string" Both. I need text compression of 25% or lower.
I am trying to convert 1000 Characters to 222 or less chars after compression.
pako do a good job than ...
0
votes
1
answer
68
views
Javascript <div>.innerHTML seems to block
I have this page. Basically, it runs two Alpha-beta pruning -based AI bots in the game of Connect Four. The problem I am experiencing is that I get the entire output after the game is over even if I ...
0
votes
1
answer
29
views
changing text of element only when condition is fullfiled
I need to change text of <span data-testid="recapItemPrice">ZADARMO</span> from 'ZADARMO' to 'DOHODOU' only when there is text in parental element 'INDIVIDUÁLNA CENA PREPRAVY na ...
0
votes
0
answers
42
views
Javascript - Attemp to replace document.execCommand with my own style function in contenteditable=true element
Ok im trying to make my own rich text editor. This is my function :
/**
* Apply Style
*
* @param selectedRange
* @param tag
*/
function applyStyle(selectedRange, tag) {
const ...
-2
votes
2
answers
33
views
Jquery Text Function Only Works Twice
I'm trying to run this script many times but it only works twice.
What it's supposed to do is ..Type a city name in the text box and then submit it and a function occurs. but it only works twice
$(...
-1
votes
1
answer
36
views
How to detect that a text node is inside a tag
I have html file
<div>1. <span id="el1"> hello </span> world</div>
<div>
<span id="el2"> first part</span>
<span ...
0
votes
0
answers
95
views
Twitch message filter from spammers
I'm moderating twitch chat using bot on node.js.
We have a problem, sometimes bots are raiding our channel and spam messages like:
88|неodeтыe голышкuнсы в т_еле_ж̴eч_кe dosia739
гolышkи шkoднuчku в-...
0
votes
3
answers
42
views
Need help to create animation to randomly change text characters in JS
I need to make animation like on this website in menu:
https://displaay.net/typefaces/retail/
Is there an existing solutions? I've tried to make it with copilot, but didn't succeed.
<script>
...
0
votes
0
answers
45
views
Proportional text scaling (Konva)
I need to scale a text in both directions but also be able to crop it with 'middle-right' or 'middle-left' anchor.
The code is below (which is basically modified version of the official example), but ...
0
votes
0
answers
33
views
How to horizontal scaling for selected text in textbox fabric js
If selected text only horizontally scaling textbox The problem is implementing horizontal scaling for selected text within a Fabric.js Textbox. The objective is to allow users to adjust the width of ...
0
votes
0
answers
48
views
Quill Bold format
By default Quill use tag to make text bold.
How replace Quill tag with which has inline style 'font-weight: 700'.
My workaround is here. But it is does not work when we use IPhone text formatting.
...
1
vote
0
answers
102
views
Problem with changing font of text in javascript
So, i wanted to make a website to change the font of the text that you enter in, basically like lingojam.com.
I did make it but for some reason only some fonts are working and i have no idea why, can ...
0
votes
0
answers
12
views
js. read page, change capitalization, slow processing time?
I have a function and a list of values being compared without regard to initial capitalization, and then giving a new value to each match. processing is slow. I've been running in browser console.
...