Questions tagged [contenteditable]

contentEditable is an HTML attribute (invented by Microsoft and standardized in HTML5) that is used for client-side in-browser "rich text" editing.

There are really two attributes involved, designMode and contentEditable. The designMode attribute governs the entire document (i.e. it makes the entire document editable, like a dedicated HTML editor). The contentEditable attribute governs just the element on which it appears, and that element's children -- like a rich text editor control within a page.

Resources

2552 questions
1
vote
1 answer

keydown on a table inside a contentEditable div

I have a div in my dom which is contentEditable and that div contains a table inside it:
My content
I can edit the value of td. But…
Aniket
  • 4,926
  • 12
  • 41
  • 54
1
vote
1 answer

Set caret position in contenteditable div layer in Chrome/webkit

I'm trying to set the caret position in a contenteditable div layer, and after a bit of searching the web and experimenting I got it to work in firefox using this: function set(element,position){ element.focus(); var range=…
Alex
  • 145
  • 1
  • 2
  • 6
1
vote
1 answer

Knockout.js contenteditable observablearray

I'm trying to allow editing items in an array of strings like so: http://jsfiddle.net/adamfraser/sr4Fg/44/ html

edit

1
vote
1 answer

Wrong keyboard cursor position on HTML page with uses "scale"

When you create a new contenteditable on a page where scale is used, the keyboard cursor is sometimes put at a wrong position with Firefox. Example : click on the right side of the window in the following snippet example : the "Strawberry"…
Basj
  • 41,386
  • 99
  • 383
  • 673
1
vote
0 answers

Select an image inside a "contenteditable" div

I'm using Firefox. I want to make an image inside a contenteditable div get selected by code like when you click the image. Bear in mind that when you click on image inside a contenteditable div the image get some little squares around (eight in…
nightclub
  • 671
  • 2
  • 9
  • 20
1
vote
0 answers

Contenteditable text selection with no outline

I have a contenteditable text structure like so:
This sentence contains
Alex McMillan
  • 17,096
  • 12
  • 55
  • 88
1
vote
0 answers

document execCommand not working with canvas element

I am trying to create an text-editor. In this i am using contenteditable div in which i have to create multiple canvas element but when i create it by using var A = "
user3467273
1
vote
1 answer

Some div with placeholder

I want to create a placeholder in my editable "divs". I have some divs like this:
JaviZu
  • 487
  • 1
  • 8
  • 20
1
vote
1 answer

Insert text at the caret position, inside a contenteditable body of a frame

I have an iframe object, and there is a contenteditable body inside. I would like to paste some text, or html element at the caret position. I tried this code, but I've got an error Cannot read property 'createRange' of…
Iter Ator
  • 8,226
  • 20
  • 73
  • 164
1
vote
0 answers

Manually Edit contenteditable Source HTML

I have a working content editor which uses a contenteditable div as a basic WYSIWYG editor. I need to allow users to edit the source HTML of the contenteditable div if they wish to do so. I have a mostly working solution to achieve this which looks…
Erve1879
  • 845
  • 1
  • 14
  • 26
1
vote
0 answers

jQuery Tracking Selection of Multiple DesignMode iframes

I'm using designMode="on" on several iframes to allow user editing of their content. I also have buttons (outside the iframes) that, when clicked, should do something to the currently focused iframe. However, when you click the button, the button…
IceMetalPunk
  • 5,476
  • 3
  • 19
  • 26
1
vote
1 answer

execCommand not working properly in ie

The problem is with the execCommand, it is not being executed in IE even in IE10 properly . For instance, When I click bold and keeps on typing, in IE it is not making the letters bold, I have to select the text and click bold in order to make it…
1
vote
1 answer

Place tags around certain text within contenteditable without moving cursor

I am working on a simple (I thought) word processor. It uses contenteditable. I have a list of words that I want to always appear highlighted.

Once upon a time, there were a couple of…

fnsjdnfksjdb
  • 1,653
  • 5
  • 19
  • 33
1
vote
1 answer

Bug in MCE setCursorLocation, or Webkit?

Oddly enough, it seems Webkit doesn't like editor.selection.setCursorLocation(span), where span is an empty span with styling: Typing after setting it this way, does not type within the styled span. Is this a known bug in Chrome - or TinyMCE? Other…
NoBugs
  • 9,310
  • 13
  • 80
  • 146
1
vote
1 answer

Losing focus in contenteditable in safari

I have a strange behaviour with contenteditable in safari. My content editable lose focus when I click on the element.

Title

$('#authoringTitle').click(function(){ $(this).text(''); }) As you…
Salvador Dali
  • 214,103
  • 147
  • 703
  • 753
1 2 3
99
100