Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 07-11-2009
Member
 
Join Date: Jan 2009
Posts: 41
JAVA WYSIWYG Editor information

Hi,
I am learning JAVA. I had not started with the same yet. So as a beginner which is the best way to begin with. I prefer to go with WYSIWYG editors in the language. The GUI type interface makes it very easy to get a start with. How to get a start and I also need some sample coding for the same. The coding must be simple and understandable. I have performed some basic commands and received profound results on the same. Thanks in advance.
Reply With Quote
  #2  
Old 07-11-2009
Member
 
Join Date: Oct 2005
Posts: 2,389
Re: JAVA WYSIWYG Editor information

A simple WYSIWYG editor is fine to use and you can get feel of the scripting language. There ample of editors available you can get one and try the below sample. But the sample exercise can be conducted only if you have basic language of JAVA. To use a WYSIWYG editor you need a program like a DIV or a normal textarea iframe because it may indicate, for example, no graphics. Now here I am working with a div because it is a bit easier for beginners to cope. This works using the command "contentEditable" what changes I allowed in the Div. code:
PHP Code:
<HTML
<
HEAD
<
style type="text/css"
# div ( 
height200px
width100%; 
border1px solid # 7d7d7d; 

</ 
style
</ 
HEAD
<
BODY
<
div id="div" contentEditable
</ 
div
</ 
BODY
</ 
HTML
Reply With Quote
  #3  
Old 07-11-2009
Member
 
Join Date: May 2008
Posts: 2,383
Re: JAVA WYSIWYG Editor information

As per the above post you can insert text in div. For this you will need to ntegrate other functions such as changing the font to bold or italic. This gives a opportunityto use the function "execCommand" of JavaScript. So let's create a button for the format by calling the OnClick function. This function in turn increases the selected area and puts execCommand to the desired formatting. The sample type for the same is as follows.
PHP Code:
HTML
<
HEAD
<
style type="text/css"
# div ( 
height200px
width100%; 
border1px solid # 7d7d7d; 

</ 
style
<
script language="javascript"
Format command function (, content) ( 
  
div.focus (); 
  
document.execCommand (commandfalsecontent); 

</ 
script
</ 
HEAD
<
BODY
<
button OnClick="formatting('bold','')"Bold </ button
<
div id="div" contentEditable
</ 
div
</ 
BODY
</ 
HTML
Reply With Quote
  #4  
Old 07-11-2009
Member
 
Join Date: Feb 2008
Posts: 1,848
Re: JAVA WYSIWYG Editor information

You can face a problem after working with DIV and not the textarea command. Therefore this cannot be propagated as PHP, so it writes to the database. You will need to now how to create a form with a textarea that is hidden, and in which the entire content enters the Div. If someone is driving on the Absendbutton the start using this feature OnMouseOver. After that if you face any problem with DIV and not with textarea then you can create a form with a textarea that is hidden.The problem, however, can be utilized as you can keep on adding annotations to the function that the div and the same is displayed only if JavaScript is enabled and the form field is hidden.
Reply With Quote
  #5  
Old 08-11-2009
Member
 
Join Date: Feb 2009
Posts: 96
Re: JAVA WYSIWYG Editor information

download JGrasp--- pretty easy to use but it it all hard coding... The thing about JAVA, WYSIWYG isn't the best for it. JAVA is a simpler form of c# and thus just writing the code will make it easier for you to understand then to make pretty objects like in visual studio.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "JAVA WYSIWYG Editor information"
Thread Thread Starter Forum Replies Last Post
What are the functions wysiwyg editor Tarjan Windows Software 5 01-04-2010 04:14 AM
Need WYSIWYG Online Web Editor MaggieK Software Development 5 18-02-2010 03:27 AM
Need some information on PSPad editor Aloke Software Development 5 09-01-2010 05:57 AM
Best editor for java HardWeaR Windows Software 3 24-11-2009 09:47 AM


All times are GMT +5.5. The time now is 12:46 AM.