contenteditable Questions

3

Solved

I've searched the web but can't find a way to work with contenteditable events on Angular 6/7. Angular seems to have a messy solution with it but said feature doesn't seem to be carried over to rec...
Photomontage asked 3/11, 2018 at 10:18

5

I am trying to make a textarea content editable and I am failing. I am using this code: <textarea id='' class='' name='notes' rows='12' cols='67' contenteditable='true' ></textarea> ...
Heronry asked 14/10, 2009 at 14:56

5

Solved

So I have a bunch of paragraph elements which are dynamically populated from a db. I have made the elements contenteditable. I now want to submit edits back the the db via a standard form submissio...
Singlephase asked 6/6, 2011 at 4:17

4

Solved

Firefox inserts a <br /> tag on press enter whereas the other browsers are adding either a <p> or <div>. I know that chrome and safari are inserting the same tag of the firstchild...
Gynaeceum asked 18/4, 2011 at 15:55

3

Solved

I want to make div with contentEditable attribute which is allowing only text. It's easily achievable in Chrome by using: <div contenteditable="plaintext-only"></div> However it does...
Reinareinald asked 18/1, 2014 at 15:2

4

Solved

The padding of a textarea is always fixed. When the text content of the textarea is scrolled, the padding remains near the edges. The padding of a contenteditable element behaves differently. When...
Rochellerochemont asked 20/12, 2014 at 4:4

1

I have an editor that is supposed to have entities with the props name, color, start, end. In the editor the text in positions denoted by start and end will be subsistuted by name, and it will be r...
Pren asked 28/3, 2020 at 17:17

2

Reading this webkit document, It says the beforeinput event when used with contenteditable is cancelable. But I run the code in the document on a chrome browser and the event is not cancelable. A...
Repress asked 4/11, 2018 at 12:25

5

I am storing content in the database, for example: Hello This is Text and when I pass that to a textarea, it stays with the new line breaks. But if I pass that text to a div with content editab...
Estremadura asked 26/9, 2013 at 20:28

11

I have a <div contenteditable=true> where I define by a WYSIWYG some elements. For example <p>,<h1>, etc. I would like to directly put the focus on one of these elements. For exam...
Hospitable asked 5/3, 2010 at 16:15

2

When typing text into a contenteditable span in Safari or Firefox the caret moves to the start on each keypress. This only seems to happen when React re/renders the component. Chrome works just fi...
Depute asked 10/11, 2016 at 22:0

12

Solved

How do I listen to change events for a contentEditable-based control? function Number() { let [value, setValue] = useState('123'); function onChange(v) { // Doesn't fire :( console.log('chang...
Nobile asked 27/3, 2014 at 3:52

23

Solved

I want to run a function when a user edits the content of a div with contenteditable attribute. What's the equivalent of an onchange event? I'm using jQuery so any solutions that uses jQuery is pr...
Aretina asked 7/9, 2009 at 23:15

9

Solved

Scenario I have a contenteditable <div> area, and within this area I may have some <span contenteditable="false"></span> containing some text. The idea is, these span elements wi...
Diatropism asked 5/1, 2015 at 19:0

8

Solved

I have got this code <div id="IIYBAGWNBC" contenteditable="true"></div> And this in jquery $("#IIYBAGWNBC").text(function(index, currentText) { return currentText.substr(0, 100); }...
Crumley asked 5/11, 2015 at 17:53

4

Solved

I am using the module react-simple-contenteditable to enable editing of a fill in the blank worksheet. The reason I must use a content editable element instead of an input element is because I want...
Tripedal asked 13/11, 2017 at 5:19

3

Solved

Let's say I have a set of contenteditable="true" divs. <div id="0" contenteditable="true"></div> <div id="1" contenteditable..></div> <div...etc></div> I can'...
Postman asked 24/1, 2011 at 1:41

11

Solved

For an application we're developing at the company where I work, we need an input that supports inserting emoticons inside our JS-based web app. We're currently using an input with the emoticon sho...
Refine asked 26/7, 2011 at 14:19

3

I have the following: http://jsfiddle.net/mb76koj3/. [contentEditable=true]:empty::before{ content:attr(data-ph); color: #CCC; text-align: center; } h1 { text-align: center; } &...
Mentor asked 26/3, 2015 at 21:14

13

Solved

When using contentEditable in Firefox, is there a way to prevent the user from inserting paragraph or line breaks by pressing enter or shift+enter?
Imperceptive asked 8/1, 2009 at 18:7

7

recently noticed that Google chrome elements upon click showing cursor blink and that's spooky. HTML page elements became editable? It's not happening with Mozilla, and the extensions enabled on ch...
Cropland asked 23/10, 2020 at 11:41

5

I want to use <div onInput={onChange} contentEditable> to save user input like textarea does. I've heard that I need to use onInput listener to trigger fn when input change. The problem is wh...
Algerian asked 28/1, 2021 at 8:1

6

Solved

I have following code: <div contentEditable="true"> Blah blah <a href="http://google.com">Google</a> Blah blah </div> Fiddle Is there a way to make this a clickab...
Resistor asked 21/8, 2012 at 16:25

9

Solved

I need to move caret to end of contenteditable node like on Gmail notes widget. I read threads on StackOverflow, but those solutions are based on using inputs and they don't work with contenteditab...
Recant asked 14/7, 2009 at 13:13

1

I am making an editor without relying on contenteditable, in order to get a clean, controlled output. So I'm catching all keyboard and mouse events, building a model and creating a DOM view from th...
Stretchy asked 6/7, 2015 at 9:43

© 2022 - 2025 — McMap. All rights reserved.