designmode

Visual Studio 2013 Browser Link - Enable CTRL to Edit in Browser

笑着哭i 提交于 2019-12-04 08:02:19
How do you enable CTRL key for the Visual Studio Browser Link integration? Scott Hanselman discusses it here around 1:06:00 during the VS 2013 Launch Event . I'm not sure how to activate or enable the realtime HTML Edit feature so I can edit in the browser and have the changes pushed back to Visual Studio. Has anyone tried this out yet or can provide clues? I have VS 2013 RTM - I can't seem to find any update for ASP.NET Web Tools that may have changed this behavior. Is this an IE only behavior or is it browser independent? It sounds like it just injects additional HTML into the page.

Disabling Firefox and Chrome spell checking in iframe-based text editors

一曲冷凌霜 提交于 2019-12-02 06:27:43
There is a lot of info around about how to disable spell checking in html textarea element by using spellcheck='false' . However to have text area with more advanced capabilities, one must use iframe with designMode = "on" (see e.g. this page , this is a way that RichTextArea is implemented in GWT) and I couldn't find a single post on that topic. It turns out that Firefox detects such advanced text areas and enables its spell checking in them. You can see it live by visiting this page from Firefox/Chrome and entering some content to text field. If you inspect html source code with e.g. Firebug

Possible to populate and save text entered from inside a iframe in designMode?

自古美人都是妖i 提交于 2019-12-02 03:44:47
i am just about to start writing my own rich text editor but need to know if its possible to populate the text area and also how to save / use the data inside it. I am currently using ckEditor, but its too clunky and large for what i want. Ill be using this as a base: http://jsfiddle.net/Kxmaf/6/ I need to run certain checks on the data as well to check its length. Thanks. code if needed: HTML: <a id="bold" class="font-bold">B</a> <a id="italic" class="italic">I</a> <select id="fonts"> <option value="Arial">Arial</option> <option value="Comic Sans MS">Comic Sans MS</option> <option value=

designMode iFrame Get Cursor Position

家住魔仙堡 提交于 2019-12-01 00:35:28
I want to get the cursor position of an editable iFrame (using designMode). Here is the code I have so far: document.getElementById('iframe_id').contentWindow.document.getSelection().getRangeAt(0) From there, getting the property startOffset gets the number of characters from the beginning of that line, but not from the beginning of the iFrame document. I would like to get the cursor position relative to the beginning of the document. Please note: I am not interested in setting the cursor position ; I just want to get it. Preferably, I would like the fix to be compatible with Chrome/Safari

designMode iFrame Get Cursor Position

非 Y 不嫁゛ 提交于 2019-11-30 19:38:43
问题 I want to get the cursor position of an editable iFrame (using designMode). Here is the code I have so far: document.getElementById('iframe_id').contentWindow.document.getSelection().getRangeAt(0) From there, getting the property startOffset gets the number of characters from the beginning of that line, but not from the beginning of the iFrame document. I would like to get the cursor position relative to the beginning of the document. Please note: I am not interested in setting the cursor

Create properties that only apply on design time

若如初见. 提交于 2019-11-29 10:47:19
I am using visual studio dark theme. As a result when designing my views I cannot see the font if its black. A fix will be to set the background of the view to white. But our application has different themes so I cannot hard code that. There are to great properties that I use when creating an usercontrol: d:DesignWidth="1110" d:DesignHeight="400" those properties are only affecting the view at design time. It will be great if I can create a property d:DesignBackground just so that I do not have to be adding and removing the background property every time I run the application. Not sure if it's

How to set a value to display for bound properties in WPF design mode?

≯℡__Kan透↙ 提交于 2019-11-29 02:28:42
My bound contents are showed as empty string in the UI design-mode. I want to display some faked value for those contents but I don't know how to. Please share if you know how to. Thank you! An easy way to get Design-time-data in Visual Studio 2010 is to use a design-datacontext. Short example with a Window and a ViewModel, For DataContext, the d:DataContext will be used in Design-mode and the StaticResource will be used in runtime. You can also use a separate ViewModel for design but in this example I will use the same ViewModel for both. <Window ... xmlns:mc="http://schemas.openxmlformats

Firefox - designMode: disable image resizing handles

寵の児 提交于 2019-11-28 20:43:52
How can I prevent the user from being able to resize an image in designMode? (disable the handles when image is clicked) Say you turn contentEditable on like this: document.body.contentEditable = true; All you have to do is turn it off for all (or some) images. var imgs = document.getElementsByTagName("IMG"); for (var i = 0; i < imgs.length; ++i) { imgs[i].contentEditable = false; } This works fine for Firefox: document.execCommand("enableObjectResizing", false, false); For IE i've used: image.attachEvent("onresizestart", function(e) { e.returnValue = false; }, false); I think you'll find this

Create properties that only apply on design time

拥有回忆 提交于 2019-11-28 04:15:16
问题 I am using visual studio dark theme. As a result when designing my views I cannot see the font if its black. A fix will be to set the background of the view to white. But our application has different themes so I cannot hard code that. There are to great properties that I use when creating an usercontrol: d:DesignWidth="1110" d:DesignHeight="400" those properties are only affecting the view at design time. It will be great if I can create a property d:DesignBackground just so that I do not

How to set a value to display for bound properties in WPF design mode?

风流意气都作罢 提交于 2019-11-27 21:53:59
问题 My bound contents are showed as empty string in the UI design-mode. I want to display some faked value for those contents but I don't know how to. Please share if you know how to. Thank you! 回答1: An easy way to get Design-time-data in Visual Studio 2010 is to use a design-datacontext. Short example with a Window and a ViewModel, For DataContext, the d:DataContext will be used in Design-mode and the StaticResource will be used in runtime. You can also use a separate ViewModel for design but in