designmode

Problem using Winforms WebBrowser control as editor

I am currently working on a project where I am using a WebBrowser control as an editor. I have design mode turned on and it seems to be working. The issue im having is when I try to save the Document and load another it pops up the "This document has been modified." message. What I am trying to do is as simple as this if (frontPage) { ...

WPF: How can I create sample data in design mode?

I would like to create sample data which are created only in design mode (When the WPF Window is shown in the Visual Studio WPF Designer or in Expression Blend). I tried this: public MainWindow() { InitializeComponent(); if (DesignerProperties.GetIsInDesignMode(this)) { DataContext = new Person() { Name = "Harry" };...

Can't switch on designMode in Internet Explorer

The following code works in Firefox 3.6, but not in Internet Explorer 8: <html> <head> <title>Example</title> <script type="text/javascript"> function init() { alert(document.designMode); document.designMode = "on"; alert(document.designMode); } </script> </head> <body onload="init()"> </b...

Unable to select text after entering designMode in IE

I am using jQuery plugin (http://plugins.jquery.com/project/lwRTE) and oddly enough in IE8 when I close the RichText Editor (which opens within a lightbox), I am unable to select any text on the document. This is a peculiar case and happens when TextArea of RichText Editor already contains some text and I 'give' focus to the TextArea an...

Make specific elements in designMode iframe read-only?

I have an iframe which has designMode set to 'on'. In it, I have a div which the user should be able to type in, and also in the iframe, I have another div which the user should NOT be able to type in. Is there a way to do this? Using contentEditable is not a solution in my case. ...

Any WYSIWYGs that use contentEditable rather than an iframe?

I am looking for a list of WYSIWYG editors that use contentEditable rather than a designMode iframe. The reason I want this is that I want to have a few regions (divs) on my site that users can edit, and I want the styling (fonts, font colors, etc). to look the same in the edit area as it normally does. I don't want to have to apply a s...

DIV Contenteditable expand problem

I have a div with contenteditable set to true to act as a text input. Now usually, it expands as some text reaches the end of the div, but if I resize the div, this stops happening. The browser no more does this. I tried to set the height after resizing it to auto, but it didn't help either. Please help me on that one. Thanks. ...

HTML designMode, move cursor programmatically using default keypress handlers

Although I already got an answer, I'll start a small bounty on this one. As the answer is that it is impossible, I'm searching for an alternative solution or some other suggestion. I'm making a very customized editor using the HTML designMode. In one situation, I want the default action of a keypress be accomplished twice when pressing ...

How to alternate moveStart in Firefox?

Does anybody know how to use range.setStart in the same way as range.moveStart works in IE? I'd like to implement backspace/delete in JS, something like this: range.moveStart('character',-1); range.deleteContents(); but in Firefox ...

Alternatives to execCommand

Hi all, I'm looking to create a WYSIWYG editor, using jQuery as a framework from which I can use different methods to ease production. I do actually have a working editor at the moment, and it's working well. I use an iFrame, and set it's designMode to on and go from there. However there are a few things which are nagging me. Take as...

Debug control crash in visual studio designer

I've got a control that crashes on the form designer when I build the application, and am trying to figure out how to debug the problem. I thought all I needed to do to be able to get in with a debugger was to start a second copy of VS and use Debug-Attach to process and attach to the copy of visual studio that the solution with my trou...

Can't get value of designMode IFRAME

I can't retrieve the contents of an iframe, when designmode = 'on'. Here is my code: val = $("#frame").val(); I've tried everything, and nothing works, help? ...

Is designMode bad?

In a previous post that I posted here, I got responses that contentEditable and designMode are bad practices. So I switched to TinyMCE, but that uses designMode as well... is there something bad about it? Im using it for a Rich Text editor on my website fyi. ...