2,563 questions
Score of 0
1 answer
65 views
Create clickable target in contenteditable div
I'm trying to change a variable when I click on specific text in a content editable div, trying to simulate a hyperlink.
When I console.log the target on Noteblock events and use an if statement to ...
Score of 0
0 answers
47 views
Safari/Chrome: Caret not placed before/after non-editable elements in rich-text editors (Jodit)
I’m facing a caret-position issue in Safari when working with non-editable elements inside a rich-text editor (for example Jodit).
When an inline or block element inside the editor is marked as non-...
Score of 0
1 answer
61 views
Apply contenteditable to selected columns in HTML Table
Is it possible to applay the contenteditable attribute to selected columns in an HTML table?
According to https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/col and https://...
Score of 1
0 answers
64 views
Caret not positionning well when using word-spacing in contentEditable div on iPad
I would like to have more space between words in a contenteditable div. Word-spacing css property works very well on Chrome on Windows and Android, but on iPad the caret is often positionned in the ...
Score of 0
1 answer
122 views
Struggling with Multi-Line Input Field for Combined User and AI Text
I’m working on an input field that combines user input (userText) and AI-generated suggestions (aiText). The goal is to make them appear as part of the same sentence, even when the user hasn’t ...
Score of -1
1 answer
111 views
isssue detecting backspace from mobile keyboards in js
So i am using a <span> with contenteditable="true". onkeydown generates new elements with the key pressed as text. I use preventDefault() to not show the pressed character in the input ...
Score of 0
1 answer
76 views
Caret doesn't follow text-indent after pressing enter
The JS code is there to remove remaining newlines when h1.textContent is empty, so that :empty::before gets applied. This is a simplified version of the code I'm working on (so inclusion of "...
Score of 4
1 answer
94 views
How to make contenteditable respect the initial size of a table cell?
My table has 3 cells: the first two contain inputs, and the third one has my contenteditable. Each cell has a width of 33.333%. When I type text into an input and it overflows, everything works fine — ...
Score of 0
1 answer
75 views
Three Contenteditable Divs that connect as one larger text box with maxChars of 274
I'm building a tool to help me with multi-part tweets when I need to separate the character limitations into separate tweets. I want it built so that if I copy a large body of text or freely type into ...
Score of 1
1 answer
143 views
Highlight the line where the caret is in a contenteditable element in JavaScript & Html
I am developing a text editor for the web frontend, and I want to highlight the line where the text caret is located.
Normally, it should be quite simple to implement: just by listening to the ...
Score of 1
1 answer
74 views
Cursor in contenteditable LI does not go to EOL on click (Chrome)
I am using a content editable list. Currently I am not able to solve the following chrome problem (it works fine in FF at least).
When you click after the end of the following lines, the cursor is ...
Score of 0
1 answer
378 views
How to toggle Tagify Inputs Between Editable and Non-Editable Modes
I know there are examples, but I don't seem to be smart enough to figure out what to do.
I'm working on a JavaScript application where users can create notes with tags. I'm using the Tagify library to ...
Score of 0
1 answer
63 views
Contenteditable Div Expands Instead of Adding Scrollbars
I have a contenteditable div with the ID editor. I'm encountering an issue where the editor keeps expanding in height as I add content. I have overflow-y set to auto, but instead of adding scrollbars, ...
Score of 0
1 answer
86 views
Contenteditable: Some problems with creating and focusing span
I've been trying to solve this issue for a few days now but I don't have any idea how I can fix it. I hope you can help me or give me some tips which lead me to the point to fix the issues.
I'm ...
Score of 0
1 answer
38 views
How to debug `react-contenteditable` which expects a string but got composite `object`
I'm trying to follow the craft.js basic tutorial to create a Text element with editable content. The example uses the react-contenteditable npm package to achieve this, but when I use it in my project ...