o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

Great HTML Editor Javascript Code -

Just place this into a form and voila!!!!
Code:
<html>
<head>
<title>HTML Editor</title>
<script language="JavaScript">

  function Init()
  {
    iView.document.designMode = 'On';
    setTimeout("populate()",500)
  }
  
  function populate(){
	iView.document.body.innerHTML = window.opener.inputForm.txtDesc.value
	iView.document.body.focus()
  }
  
  function selOn(ctrl)
  {
	ctrl.style.borderColor = '#000000';
	ctrl.style.backgroundColor = '#B5BED6';
	ctrl.style.cursor = 'hand';	
  }
  
  function selOff(ctrl)
  {
	ctrl.style.borderColor = '#D6D3CE';  
	ctrl.style.backgroundColor = '#D6D3CE';
  }
  
  function selDown(ctrl)
  {
	ctrl.style.backgroundColor = '#8492B5';
  }
  
  function selUp(ctrl)
  {
    ctrl.style.backgroundColor = '#B5BED6';
  }
    
  function doBold()
  {
	iView.document.execCommand('bold', false, null);
  }

  function doItalic()
  {
	iView.document.execCommand('italic', false, null);
  }

  function doUnderline()
  {
	iView.document.execCommand('underline', false, null);
  }
  
  function doLeft()
  {
    iView.document.execCommand('justifyleft', false, null);
  }

  function doCenter()
  {
    iView.document.execCommand('justifycenter', false, null);
  }

  function doRight()
  {
    iView.document.execCommand('justifyright', false, null);
  }

  function doOrdList()
  {
    iView.document.execCommand('insertorderedlist', false, null);
  }

  function doBulList()
  {
    iView.document.execCommand('insertunorderedlist', false, null);
  }
  
  function doForeCol()
  {
    var fCol = prompt('Enter font color', '');
    
    if(fCol != null)
      iView.document.execCommand('forecolor', false, fCol);
  }

  function doLink()
  {
    iView.document.execCommand('createlink');
  }
  
  function doFont(fName)
  {
    if(fName != '')
      iView.document.execCommand('fontname', false, fName);
  }
  
  function doSize(fSize)
  {
    if(fSize != '')
      iView.document.execCommand('fontsize', false, fSize);
  }   
  
  var didSave = false
  
  function saveAndClose()
  { 
		didSave = true
		iHTML = iView.document.body.innerHTML 
		
		myString = new String(iHTML)
		rExp = /<P align=left>/gi;
		newString = new String("<DIV align=left>")
		iHTML = myString.replace(rExp, newString)
		iView.document.body.innerHTML = iHTML		

		myString = new String(iHTML)
		rExp = /<P align=center>/gi;
		newString = new String("<DIV align=center>")
		iHTML = myString.replace(rExp, newString)
		iView.document.body.innerHTML = iHTML		

		myString = new String(iHTML)
		rExp = /<P align=right>/gi;
		newString = new String("<DIV align=right>")
		iHTML = myString.replace(rExp, newString)
		iView.document.body.innerHTML = iHTML
		
		myString = new String(iHTML)
		rExp = /<P>/gi;
		newString = new String("<DIV>")
		iHTML = myString.replace(rExp, newString)
		iView.document.body.innerHTML = iHTML
		
		myString = new String(iHTML)
		rExp = /<[/]P>/gi;
		newString = new String("</DIV>")
		iHTML = myString.replace(rExp, newString)								
		
		window.opener.inputForm.txtDesc.value = iHTML
		window.close() 
  }
 
  function saveIt(){
	 if (!didSave && iView.document.body.innerHTML != ""){
		 if(confirm("Do you want to save?")){
			 saveAndClose() 		
		 }
	 }
  }
</script>
<style TYPE="text/css">
	body	{position: absolute; top: 0; left: 0; margin: 0; padding: 0  }

  .butClass
  {    
    border: 1px solid;
    border-color: #D6D3CE;
  }
  
  .tdClass
  {
    padding-left: 3px;
    padding-top:3px;
  }

</style>

</head>

<body onLoad="Init()" onBeforeUnload="saveIt()">
	<table id="tblCtrls" width="415px" height="30px" border="0" cellspacing="0" cellpadding="0" bgcolor="#D6D3CE">	
	<tr>
		<td class="tdClass">
			<img class="butClass" alt="Save and Close" src="images/htmleditor/save_and_close.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="saveAndClose()" width="100" height="22">
		
			<img alt="Bold" class="butClass" src="images/htmleditor/bold.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doBold()" width="23" height="22">
			<img alt="Italic" class="butClass" src="images/htmleditor/italic.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doItalic()" width="23" height="22">
			<img alt="Underline" class="butClass" src="images/htmleditor/underline.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doUnderline()" width="23" height="21">
			
			<img alt="Left" class="butClass" src="images/htmleditor/left.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doLeft()" width="23" height="22">
			<img alt="Center" class="butClass" src="images/htmleditor/center.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doCenter()" width="23" height="22">
			<img alt="Right" class="butClass" src="images/htmleditor/right.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doRight()" width="23" height="22">
						
			<img alt="Ordered List" class="butClass" src="images/htmleditor/ordlist.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doOrdList()" width="23" height="22">
			<img alt="Bulleted List" class="butClass" src="images/htmleditor/bullist.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doBulList()" width="23" height="22">
			
			<img alt="Text Color" class="butClass" src="images/htmleditor/forecol.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doForeCol()" width="23" height="22">			
			<img alt="Hyperlink" class="butClass" src="images/htmleditor/link.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doLink()" width="23" height="22">			
		</td>
	</tr>
	</table>
	<iframe id="iView" style="width: 415px; height:205px"></iframe>

    <table width="415px" height="30px" border="0" cellspacing="0" cellpadding="0" bgcolor="#D6D3CE">	
    <tr>
		<td class="tdClass" colspan="1" width="50%">
		  <select name="selFont" onChange="doFont(this.options[this.selectedIndex].value)">
		    <option value="">-- Font --</option>
		    <option value="Arial">Arial</option>
		    <option value="Courier">Courier</option>
		    <option value="Sans Serif">Sans Serif</option>
		    <option value="Tahoma">Tahoma</option>
		    <option value="Verdana">Verdana</option>
		    <option value="Wingdings">Wingdings</option>
		  </select>
		  <select name="selSize" onChange="doSize(this.options[this.selectedIndex].value)">
		    <option value="">-- Size --</option>
		    <option value="1">Very Small</option>
		    <option value="2">Small</option>
		    <option value="3">Medium</option>
		    <option value="4">Large</option>
		    <option value="5">Larger</option>
		    <option value="6">Very Large</option>
		  </select>
		</td>
		<td class="tdClass" colspan="1" width="50%" align="left">
		</td>
    </tr>
    </table>
</body>
</html>

 

[2005] HTML Editor Problem HELP NEEDED ASAP -
Hi All, I have an HTML Editor. I've made it into a .NET control (.ascx) so I can use it in multiple projects. The editor comprises of a bunch of Javacript run buttons to control the bold, underline, etc and an iFrame that is edittable. In order to capture the HTML out of the edit


Does anyone know how to make a HTML editor in vb .net or even how i should start one -
Does anyone in here know how to make a good html editor i would prefer it be in vb .net language but i could rea arrange it if it were in vb6 or something like that. i really need an html editor for a program i am writing so any help you could give me at all would be great! Thanks!


Does anyone know how to make a good HTML editor -
Does anyone in here know how to make a good html editor i would prefer it be in vb .net language but i could rea arrange it if it were in vb6 or something like that. i really need an html editor for a program i am writing so any help you could give me at all would be great! Thanks!


How do I create my own HTML editor.. -
Morning all, Can anyone point me in the right direction for learning how to create my own HTML editor? I have been building an internet application and I would like to include an HTML editor as part of the application which will let users edit html pages my app. creates. I hav


HTML Editor, finding something in the code. -
Hi! I downloaded a free project of an HTML editor, in this editor I can switch between visual and code. With my application I will use only one kind of html archive that contains javascript command that shows me when a "crew" of the company have to leave. this is th


PLease HELP!!! Programming Language Mayhem!! -
Ok The thing is I have questions about diff languages which seem to be bothering me 24:7. 1. What is the difference between HTML, VBSCRIPT, JavaScript and Java 2.If I want to learn JavaScript or Java or whatever languAGE, Is it possible to purchase a compiler like MS VB6 or can


(X)HTML Editor w/ CSS capability -
Does anyone know of any (X)HTML/CSS editor(s) that will allow you to layou your site using div tags? I want to make some changes to my site, but everything I have wants to dump it all into table (shudder) to control the layout (or adds a ton of crap code I wouldn't know -or care- to


HTML Editor for windows form -
Hi, Someone know of a html editor control (free) one can use in a window form? I am creating a desktop application to update the data, and I want the user to save html formatted text (to be used on website) But I dont want people to copy and paste in html from dreamweaver (too


Javascript equivalent of FrontPage include page -
I am using frontpage as a webpage editor but I am not using a server running frontpage extensions. What javascript code can I use to mimic the include page component? Basically, I want to load a menupage.html in to a cell in a table on page index.html without scrollbars, etc.


Text Editor for MACS -
I'm trying to save my javascript to text editor (Version 1.4 (220) on my mac ..I'm Saving it as hello.html The problem is that i see all my tags. Can anyone help The options under the text editor under save as are as following Rich Text Format(RTF) HTML WOrd Format Word XML


Changing/Replacing HTML-Code -
I need some help for the following problem: How can I change/add a certain content(i.e. Name of customer) in an existing HTML document via VB? For example: Dear ******** <--- Name of customer to be changed/added We want to inform....... The HTML files are pure HTML without


What would like to see in a html editor -
I am making a WebPage Editor, where the users just have to click on buttons to insert code. What i want to know is why kinda of features would you pay for in a web editor? What would you want to see in a editor in general.? looking for your opinion thanks


JavaScript & Form Posting -
Hi everyone, I have a page that includes a Rich Text editor in the HTML (like in Hotmail) so that a user can create nicely formatted documents. I also have, on that same page, a form that includes data such as the page title etc... which I want to send to a ASP page to process the


Maintain State! -
One of the menu items in a VB6 text editor gives users the option to open the recent files that has been used. Assume that before closing the text editor, a user had worked with, say, 'File1.html', 'File2.html' & 'File3.html'. After he exits the text editor & opens it later


Strings -
I'm making an HTML editor for a company I'm working for, and I'm having trouble with a certain aspect of the reloading of the html files. My editor is for the laymen, I put several fields in it, such as the title, body, headers, etc. So it's not for people that know how to use HTML.


Javascript Editor -
Hey guys, do any of you know of a javascript editor with a "dot help" function? I used one once, and I loved it. It sped up my code writing a lot. It was similar to Visual Studio. What I mean by a "dot help" function is when you type object1. it will give you a list


Can I use javascript in an HTML email -
Can I use javascript in an HTML email? I'm using VB to generate emails in Outlook 2000. I've included javascript in my HTML email, but when I send it, the receiver can only see the pure HTML portion of the email. the code is like this: Code: ....... .HTMLbody = "<html>


Cool web based html editor for you... -
Hey all, I just did a project that required me to develop a way for a web site owner to update content on each asp.net page, yet not screw anything up. So I had to have a way for them to create html content like you would in frontpage, but it had to be web based. After a lot of se


Tell me what you think -
This is Super Editor I made it with VB tell me what you think Super Editor Version 4.0.6 Super Editor has syntax highlighting and it has Favorites for the codes you use all the Time witch are in an easy to use toolbar and it has a built in web browser and debugger so you can vie


[VB6] Javascript Editor -
Hi all, I have a project in which I have a simple Javascript editor (It's basically just a rich text box ) and i want to be make it act in a similar way to the VB6 IDE:Validating of code (when the user finished editing each line) Automatically coloring relevant bits of code Automati


Creating HTML automatically -
How is it possible to make HTML automatically using a DHTML-editor? I have attached a file with such an editor. How do I implement such an editor on my asp-application?


asp.net and javascript questions -
I am remaking this webpage and I have come across asp code. In it the programmer used a lot of javascript headed by this symbol "<@". Can anyone tell me what that means. Also can anyone tell me the way to call javascript functions from within html. The javascri


ASP Form Postings -
Hi everyone, I have a page that includes a Rich Text editor in the HTML (like in Hotmail) so that a user can create nicely formatted documents. I also have, on that same page, a form that includes data such as the page title etc... which I want to send to a ASP page to process the d


Recognising Text -
Hi, im creating a HTML text editor and so far everything is fine! When a user clicks a button certain HTML tags will be put into an RTB (RichTextBox) in a certain colour. However! I would like my program to autmatically change the colour of code that is added in manually by a user! For


!!!Question for you VB gurus!!! -
Hey y'all, I am relatively new to VB programming and was wondering if it is possible to create a visual basic editor (Even though the MS editor is great) & compile the code by calling the VB compiler from within the custom made editor? Is it possible to do this? I am really lo


Saving Textboxes as HTML -
If I have three textboxes (Title, Year, and Runtime) how would I go about saving the info typed into the textboxes as html, just as if I would have if I would have done it in an HTML editor. I know basic html code and I would know how to do it in editor such as frontpage but I want to


Javascript > HTML -
I was just messing about trying to convert this: http://javascript.internet.com/misce...converter.html To Delphi, but im no good at Javascript, i used to know it well, but that was about 4 years ago. Does anyone know how to convert it to Delphi, or even VB. If in VB, then i ca


HTML/Javascript - Creating and manipulating -
Hi, I am making a javascript animator which will animate a checker game on a board. Is there any way in HTML(object?) or javascript to create a simple circle image? I need to be able to manipulate the location of the circles when pieces are moved.


Javascript to read html -
I need to write a javascript that will read another html file... and will update it on the screen. Specifically, I have a txt/html file that changes every second on the server side and I'd like the javascript to read the file and alter the webpage. I do not want to just keep reload


Try my Editor I made with VB and tell my what you think -
Super Editor has syntax highlighting and it has Favorites for the codes you use all the Time and has a built in web browser so you can view the html code you just made and not only that but you can open more than one file in one editor Now In the new Version a toolbar makes your Favori


Javascript :-( -
Hello, I have some ASP code which reads thru a table and gets info from it like name, html etc. This info is used to build a table in HTML which displays the NAME and if there is a link to a webpage it adds the hyperlink which I get from the HTML fields in my db. This is how I


ASGSOFT HTML Editor v2 is finally out -
Hello there After so many years of hard work it's finally out. Check it out. ASGSOFT HTML Editor v2. It's free to download and try. Tell me what you think and what I should do with v3 Click here to download it. P.S. Review it while you are there.


Executing Javascript -
Hi, What is the best way to execute javascript in VB? Should I save the javascript code to an html file and use VB Shell command against it? Thanks


Can anybody read this (some other language with weird characters) -
My HTML editor is listed on this website: http://eton.dir.bg/win/htmltut.html I'm just curious about what the description says. If anybody could translate that, I'd appreciate it. My HTML editor is called SNS HTMLEdit.


Best ASP/HTML editor -
What's the best ASP/VBscript Editor? I have Homesite and Visual Interdev. Homesite is awesome for HTML/CSS, but for ASP it does little more than color code it. Visual Interdev is decent for ASP (Intellisense!), but I don't like the way it handles the HTML part of things. Any sugg


Running Javascript when Link is clicked -
Ok i am fairly new to Javascript programming. What i need to do is make a HTML webpage. On this webpage i will be placing a few links. What i need is to find out how i can make it so when a link is clicked a few lines of Javascript execute. Currently for testing purposes i am runni


What is the best HTML editor -
Hi there, What is the best Web Page (HTML) Editor : - Webexpress, Frontpage or Dreamweaver etc.


[2005] Having Javascript In Diff File -
Hi All, Can someone please tell me is it possible to have a javascript in an html file and use the html file in my ASP.Net project and call the javascript function or do I have to copy the code into the ASP.Net project? Thank you all for any help, Jiggy!


Anyone else do stupid stuff like this: -
First, I have a application that will go through an html page and parse out the links and download the file types I specify. This was existing. I then was looking at this page of Maxim's: http://www.maximonline.com/girls_of_...x_gallery.html Since it uses javascript to show the


Javascript disabled help -
I have created a html form and I am checking the users input using a javascript validator. Since it is possible for a user to disable javascript, I need to come up with the best plan to insure bad data doesn't go through. What is the best option? Can I redirect users with javascript di