ExecCommand

Sep 28, 2006

Can I use execCommand to save just the contents of a textfield as a PHP file on a users computer? I've been searching for an hour and can't figure out how to do it.

View 2 Replies


ADVERTISEMENT

IE ExecCommand Inserthtml Workaround - Insert A Youtube Video Into A Content Editable Div With Execcommand Inserthtml

Apr 3, 2011

im working with execCommand and trying to make a function to insert a youtube video into a content editable div with execcommand inserthtml. Now this works with every other browser except, OMG IE. now i am trying to use pasteHTML(), found that some people have gotten it to work, for its part but for some reason it is not working

[Code]....

View 3 Replies View Related

ExecCommand And InsertUnorderedList

Feb 23, 2005

Is it possible to use the command:

document.execCommand("InsertUnorderedList")

to specify what type of unordered list, or to use css to specify, what type of unordered list you want?

View 2 Replies View Related

Use Of ExecCommand() Function?

Jul 18, 2011

Does anybody know what's the use of the execCommand() function?? Also, is it used to add tags in textboxes??

View 6 Replies View Related

How Can I Restrict ExecCommand('undo') To A <div>?

Jul 23, 2005

I am using IE 6.0. On a page, I have placed a contenteditable div
which I want to use as a Rich Text Area. I am using the execCommand method of
the document to control bold, italics, underlining, and undo for this div.

I have placed an input element on the page to. All but the undo, are
restricted to working only on the div. How can I restrict the undo to
working on only the div?

Below is the complete page so you can see what I am talking about.
Just paste it into an htm file and traverse to it via your browser.
Type something in the div and the input and then try the buttons. Code:

View 3 Replies View Related

Custom Tags With ExecCommand

Jul 20, 2005

Does anyone know of a way to wrap custom tags around selected text
using execCommand or otherwise?

I am developing a rich text editor for use in a web site and while
there are a few decent ones already floating around I need to
implement a few extra bits of functionality. Specifically tool tips.
Idealy I'd like to wrap custom tags around selected text using
execCommand. Ie "Selected Text" becomes:

"<a title='User inputed tooltip'>Selected Text</a>".

Any ideas?

View 1 Replies View Related

ExecCommand Not Working In IE, Fine In FF?

Jul 4, 2010

I'm (experimenting) writing my own RTE in JavaScript, I'm doing pretty good until it comes to the commands, the execCommand method. Here's what I have so far:

function get(editid) {
// IE
if(document.frames[editid].document) return document.frames[editid].document;
else return document.getElementById(editid).contentDocument;
}

[Code]....

The xC (execute command) function is not working! I've tried so much.

View 2 Replies View Related

Remove Link Using Execcommand()?

Oct 8, 2010

I want to remove link. How to do that using execCommand()

View 1 Replies View Related

Problems With ExecCommand On FontName

Aug 17, 2003

I am attempting to write a wysiwyg text editor to use in back-end site administration forms. It's working pretty well, aside from one error: when I hilight a large block of text and change the font, the change only applies to portions of the text selected (which appears to be random portions). Here is the javascript I'm using:

Code:function applyFont() { document.all.rtEditor.focus(); document.execCommand(fontname, false, document.all.fontNameSelector.value);}Where am I going wrong?

View 3 Replies View Related

ExecCommand - HTML Page With One Section Having Editable Content ?

Dec 21, 2010

I'm using an HTML page with one section having editable content. Nothing overly complicated. All other execCommands are working fine, but I cannot get Paste to work. The function is called from this button:

And, here's the Javascript function:

When I use the Copy or Cut buttons the selected text is loaded into the clipboard. If I press Ctrl+V to paste, it works fine. But clicking the Paste button either has no visible effect (if no text is selected) or just deletes any selected text. I've used the Paste command before from VB without any problem, but it's been awhile since I've used JS.

View 1 Replies View Related

Insert A Link Using ExecCommand That Prompts Users For A Title First?

Apr 7, 2009

I am having a problem with my wysiwyg editor for my site, users dont like the fact that you have to select text before you create a link and I was wondering if it was possible to prompt the user to add title text before you use the execCommand('createlink') and use that has the select text that they made from the prompt. Instead of the old way where you must select text first to use execCommand('createlink') to create a link. kind of like Sitepoint's insert link function but instead prompts the user for the title and doesn't insert bbcode but a anchor tag?

View 7 Replies View Related

ExecCommand With "CreateLink" Not Working In Firefox But Ok In IE

Sep 10, 2009

I'm using this code I got from an example:

<head>
<TITLE>Creating a link</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function createLink()

[Code]....

It's working ok in IE, but in Firefox (3.5.3 I'm using), I get the following error:

Quote ... uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.execCommand]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost/america/editora/simple2.html :: createLink :: line 11" data: no]

Line 0 I have googled for this error but seems nobody is having problems with it? Any help much appreciated, I'm a rookie in javascript.

(line 11 is the CreateLink line)

View 3 Replies View Related

IE .execCommand("Copy") Not Working

Nov 26, 2010

For some reason this code to copy to the clipboard isn't working anymore in IE

$("#holdtext").innerText = '#' + $("#check").val() + '#';
Copied = document.getElementById('holdtext').createTextRange();
Copied.execCommand("Copy");

basically nothing is copied to the clipboard

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved