Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
54 views

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 ...
Out of Nightvale's user avatar
0 votes
0 answers
28 views

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-...
Niraj DCP's user avatar
0 votes
1 answer
55 views

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://...
Manngo's user avatar
  • 17k
1 vote
0 answers
52 views

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 ...
jwtrees's user avatar
  • 381
0 votes
0 answers
47 views

We are making a complex text editor using a contentEditable DIV. On mobile, when virtual keyboard give a suggestion or autocorrects a word, a single input event is first called of type ...
jwtrees's user avatar
  • 381
0 votes
1 answer
111 views

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 ...
Zethyst's user avatar
  • 215
-1 votes
1 answer
83 views

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 ...
Maze's user avatar
  • 121
0 votes
1 answer
71 views

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 "...
Kroaker's user avatar
  • 11
4 votes
1 answer
87 views

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 — ...
Seredniy's user avatar
  • 478
0 votes
0 answers
35 views

I'm working on a text editor where users can edit individual words, and I'm running into an issue with the cursor position resetting while typing. Each time a character is typed, the cursor jumps to ...
hey's user avatar
  • 91
0 votes
1 answer
45 views

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 ...
Jake Hembree's user avatar
1 vote
1 answer
95 views

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 ...
Linke's user avatar
  • 358
1 vote
1 answer
62 views

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 ...
Basti's user avatar
  • 769
0 votes
1 answer
327 views

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 ...
abalter's user avatar
  • 10.5k
0 votes
1 answer
48 views

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, ...
ally's user avatar
  • 1
0 votes
1 answer
77 views

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 ...
user avatar
0 votes
1 answer
37 views

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 ...
CertainlyNotAdrian's user avatar
1 vote
1 answer
129 views

Here is the HTML <div contenteditable="true" style="padding: 8px;"> hello world <br> <div contenteditable="false" style="display: inline-block;">hello world</div> <...
solidwaterslayer's user avatar
0 votes
1 answer
190 views

I am a hobby programmer, and have made an HTA file, with some JavaScript and a single contentEditable <DIV>. Using minimal JavaScript I can make keyboard shortcuts to format, save, and exit. I ...
Gavin's user avatar
  • 499
0 votes
1 answer
89 views

I am building a texteditor and using a contenteditable div for it. It all works peachy except when I want to lower a line of text by hitting return at the start of the row. In my app I color code the ...
Mapeja's user avatar
  • 1
0 votes
1 answer
89 views

this is how my React component looks like - <div id="test" class="content-editable" contenteditable="true">hi! <div>welcome to&nbsp;</div><div>...
Khekhekhe's user avatar
0 votes
0 answers
31 views

I am trying to get text that you type into a div with editable text to display on another html file, I'm trying to bring it from Format Test.html to display.html . Some context, I am making a little ...
Josalynn Goudy's user avatar
0 votes
1 answer
100 views

I want to create a text area or contenteditable div (preferably a text area) that has a max number of lines where, when hitting the max line, no new line breaks are added and all new text is hidden (...
Billy1301's user avatar
0 votes
1 answer
280 views

I know that Blazor does not support data-binding for contenteditable div. What I have working is the following that allows text to be written and accessed through onInput. <div role="textbox&...
Farooq's user avatar
  • 159
1 vote
1 answer
125 views

For introduction I would like to explain what I try to achieve: Inside the *div#content* I would like to detect keydown events AND get the element for which the keydown element is detected. For ...
KeepRunning85's user avatar
0 votes
0 answers
235 views

I am trying to get the id of selected list item (html-editableSelect), but in the place of select Id value I am getting undefined alert. Here is my aspx code <select id="cmb_year" runat=&...
s.k.Soni's user avatar
  • 1,410
0 votes
1 answer
185 views

I am trying to find a way to programatically select specific text within a contenteditable div and not having any luck. For textarea and input fields, I do this easily as follows; const el = ...
Ryan H's user avatar
  • 143
0 votes
1 answer
85 views

I am trying to create a text input that automatically wraps. The default input and textarea blocks did not work for the styling I wanted so I resorted to using a contenteditable div. Everything works ...
szammyboi's user avatar
0 votes
1 answer
234 views

Is it possible using some CSS properties or HTML attributes or JS solution prevent splitting text node? I don't want to call div.normalize() after each 'Enter' press And please don't suggest using ...
Teamur's user avatar
  • 141
0 votes
2 answers
57 views

I have div with contentEditable and when I add an element into it via JS, like: <span>text</span> I am not able to move cursor after - so when user input something it is going into the ...
Dawe's user avatar
  • 620
0 votes
1 answer
182 views

I have a C.R.U.D. app that builds many columns using PHP like this one below. This one is not meant to be editable by the user, only allowing a left click to display a dialogbox and a right click to ...
Keith D Kaiser's user avatar
1 vote
1 answer
188 views

Is it possible to configure an HTML element (custom element or built-in) to be treated like a single text (non-whitespace) character -- that is, it has an implied <nobr> wrapped around itself ...
Michael Scott Asato Cuthbert's user avatar
2 votes
2 answers
804 views

I would like to insert a new line in a contenteditable when the user press Ctrl+Enter. Based on the following questions, I wrote the code below: Insert newline on enter key in contenteditable div How ...
Alphonsio's user avatar
  • 133
0 votes
1 answer
94 views

I'm currently working on implementing a feature in my React.js project where I want to transform specific patterns from the text typed by user, like ($anyText), into a formatted structure like anyText....
Fares Galal's user avatar
0 votes
1 answer
93 views

I have a contenteditable div with a selectionchange event that logs the new range's getBoundingClientRect. Everything works well until the caret is moved inside an empty div, like this: <div ...
make's user avatar
  • 21
2 votes
0 answers
267 views

I'm working on a rich text editor in React/NextJS where I use a contentEditable div. I have a function updateContent that sanitizes the HTML content of this div using DOMPurify and then updates the ...
shellen's user avatar
  • 21
0 votes
1 answer
187 views

I'm working on a JavaScript project where I need to simulate typing into the message box in Instagram Direct Messages. However, the message box is not a standard input or textarea element but a div ...
Hower Software's user avatar
0 votes
1 answer
2k views

I have editable webview. I'm using webview as rich text editor. WebViewClient as AccompanistWebViewClient. And on onPageFinished I have css injection to webview view?.evaluateJavascript(js, null) but ...
Slava's user avatar
  • 767
0 votes
1 answer
192 views

I'm trying to create a custom form field that displays and edits string array as an editable ul list - the field creates a bullet for every string item in the array. The issue is when I try to manage ...
armageddon's user avatar
1 vote
2 answers
171 views

I'm trying to find a solution for this problem for a long time now, so I'm going to ask here now. Start with a normal contenteditable div element, like this one: <div contenteditable>Edit this ...
user avatar
1 vote
1 answer
165 views

I have a contentEditable div, whenever I insert a new line by pressing enter or shift+enter the new line is a textNode in the div but I want the new line to be in p element. I want a simple solution I ...
Quiet Coder's user avatar
-1 votes
1 answer
94 views

i have a contentediable div. I build the possibility, to upload image from my computer directly inside the contentediable div. Everything until here works perfect. I wrapped the image inside another ...
zazadi's user avatar
  • 1
0 votes
0 answers
55 views

I have a contenteditable div which can contain text and non-editable elements. Normally you can click after the content and then start editing the content however if the last element in the div is non-...
apc's user avatar
  • 5,686
0 votes
1 answer
192 views

I need to catch all the input in my contenteditable element and process the input in the code. Basically, what I need is to prevent input event from changing data in element and to know what data was ...
Andrew Rusinas's user avatar
2 votes
1 answer
120 views

I have the markup with non-editbale spans with user-select: none inside contenteditable div. Simplified version of it looks like this: <div contenteditable="true"> some random text ...
Victor Zhuravlev's user avatar
2 votes
1 answer
391 views

I'm currently utilizing Custom Elements within a with the attribute contenteditable=true. However, I've encountered an issue with the shadow DOM, as it seems to prevent me from selecting text across ...
Frank's user avatar
  • 21
0 votes
0 answers
44 views

a contenteditable div having this html inside <div class='dg'>lorem ipsum</div> placing cursor at the end of line and pressing Enter gives the following html: <div class='dg'>lorem ...
provance's user avatar
  • 927
1 vote
2 answers
83 views

So I have a setup like this: <div style="width:130px; background-color:lime"> <div contentEditable style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"> Hi ...
CreativeAbyss's user avatar
0 votes
2 answers
466 views

I have an h1 element in my React app that I plan to use with a contentEditable attribute to allow users to edit it directly. The problem is within the useFormValues hook that I use to manage all my ...
ipenguin67's user avatar
  • 1,609
0 votes
1 answer
74 views

const textareaHtml = ` <div class="textarea-item"> <div class="edit" role="textbox" contenteditable="true" id="${textareaId}"> &...
Anirudh S's user avatar

1
2 3 4 5
52