Creating a PHP/HTML Editor

I'm doing a school project on a PHP/HTML Editor.
I'm looking for some help on finding a good tutorial on changing properties to a JEditorPane. I want to set up the indent size, colors for tags, comments, statements, etc...
anyone help??

Here, I stole this code from the advanced forum on Saturday and tried to develop it, though gave up when I couldn't get setTabs or load file to work and tooltips was too damn slow.
I had an idea that I could use it to run javac and to execute Frames and Applets with it ... right now I'm reconfiguring the design and thinking about dropping the highlighter altogether, but thats my story. Still it may be useful /may give you ideas /may be just the base or platform you're looking for.import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import javax.swing.text.*;
import java.io.*;
class Highlighter extends DefaultStyledDocument{
     private DefaultStyledDocument doc;
     private Element rootElement;
     private boolean multiLineComment;
     private MutableAttributeSet normal;
     private MutableAttributeSet keyword;
     private MutableAttributeSet comment;
     private MutableAttributeSet quote;
     private MutableAttributeSet tabSpace;
     private Hashtable keywords;
public Highlighter(){
       doc = this;
     rootElement = doc.getDefaultRootElement();
     putProperty(DefaultEditorKit.EndOfLineStringProperty, "\n" );
     normal = new SimpleAttributeSet();
     StyleConstants.setForeground(normal, Color.black);
     comment = new SimpleAttributeSet();
     StyleConstants.setForeground(comment, Color.green);
     StyleConstants.setItalic(comment, true);
     keyword = new SimpleAttributeSet();
     StyleConstants.setForeground(keyword, Color.blue);
     quote = new SimpleAttributeSet();
     StyleConstants.setForeground(quote, Color.red);
     Object dummyObject = new Object();
     keywords = new Hashtable();
     keywords.put( "abstract", dummyObject );
     keywords.put( "boolean", dummyObject );
     keywords.put( "break", dummyObject );
     keywords.put( "byte", dummyObject );
     keywords.put( "byvalue", dummyObject );
     keywords.put( "case", dummyObject );
     keywords.put( "cast", dummyObject );
     keywords.put( "catch", dummyObject );
     keywords.put( "char", dummyObject );
     keywords.put( "class", dummyObject );
     keywords.put( "continue", dummyObject );
     keywords.put( "default", dummyObject );
     keywords.put( "do", dummyObject );
     keywords.put( "double", dummyObject );
     keywords.put( "else", dummyObject );
     keywords.put( "extends", dummyObject );
     keywords.put( "false", dummyObject );
     keywords.put( "final", dummyObject );
     keywords.put( "finally", dummyObject );
     keywords.put( "float", dummyObject );
     keywords.put( "for", dummyObject );
     keywords.put( "if", dummyObject );
     keywords.put( "implements", dummyObject );
     keywords.put( "import", dummyObject );
     keywords.put( "instanceof", dummyObject );
     keywords.put( "int", dummyObject );
     keywords.put( "interface", dummyObject );
     keywords.put( "long", dummyObject );
     keywords.put( "new", dummyObject );
     keywords.put( "null", dummyObject );
     keywords.put( "package", dummyObject );
     keywords.put( "private", dummyObject );
     keywords.put( "protected", dummyObject );
     keywords.put( "public", dummyObject );
     keywords.put( "return", dummyObject );
     keywords.put( "short", dummyObject );
     keywords.put( "static", dummyObject );
     keywords.put( "super", dummyObject );
     keywords.put( "switch", dummyObject );
     keywords.put( "synchronized", dummyObject );
     keywords.put( "this", dummyObject );
     keywords.put( "throw", dummyObject );
     keywords.put( "throws", dummyObject );
     keywords.put( "transient", dummyObject );
     keywords.put( "true", dummyObject );
     keywords.put( "try", dummyObject );
     keywords.put( "void", dummyObject );
     keywords.put( "volatile", dummyObject );
     keywords.put( "while", dummyObject );
* Override to apply syntax highlighting after the document has been updated
   public void insertString(int offset, String str, AttributeSet a)
                                        throws BadLocationException{
          if (str.equals("{"))
          str = addMatchingBrace(offset);
          super.insertString(offset, str, a);
          processChangedLines(offset, str.length());
* Override to apply syntax highlighting after the document has been updated
   public void remove(int offset, int length) throws BadLocationException{
          super.remove(offset, length);
          processChangedLines(offset, 0);
* Determine how many lines have been changed,
* then apply highlighting to each line
   private void processChangedLines(int offset, int length)
                                throws BadLocationException {
          String content = doc.getText(0, doc.getLength());
          // The lines affected by the latest document update
          int startLine = rootElement.getElementIndex( offset );
          int endLine = rootElement.getElementIndex( offset + length );
          // Make sure all comment lines prior to the start line are commented
          // and determine if the start line is still in a multi line comment
          setMultiLineComment( commentLinesBefore( content, startLine ) );
          // Do the actual highlighting
               for (int i = startLine; i <= endLine; i++){
                    applyHighlighting(content, i);
      // Resolve highlighting to the next end multi line delimiter
          if (isMultiLineComment())commentLinesAfter(content, endLine);
          else highlightLinesAfter(content, endLine);
* Highlight lines when a multi line comment is still 'open'
* (ie. matching end delimiter has not yet been encountered)
     private boolean commentLinesBefore(String content, int line){
          int offset = rootElement.getElement( line ).getStartOffset();
          // Start of comment not found, nothing to do
          int startDelimiter = lastIndexOf( content, getStartDelimiter(), offset-2);
          if (startDelimiter < 0)return false;
          // Matching start/end of comment found, nothing to do
          int endDelimiter = indexOf( content, getEndDelimiter(), startDelimiter );
          if (endDelimiter < offset & endDelimiter != -1)return false;
          // End of comment not found, highlight the lines
          doc.setCharacterAttributes(startDelimiter, offset - startDelimiter + 1, comment, false);
          return true;
* Highlight comment lines to matching end delimiter
     private void commentLinesAfter(String content, int line){
          int offset = rootElement.getElement( line ).getEndOffset();
          // End of comment not found, nothing to do
          int endDelimiter = indexOf( content, getEndDelimiter(), offset );
          if (endDelimiter < 0) return;
          // Matching start/end of comment found, comment the lines
          int startDelimiter = lastIndexOf( content, getStartDelimiter(), endDelimiter );
               if (startDelimiter < 0 || startDelimiter <= offset){
                    doc.setCharacterAttributes(offset, endDelimiter - offset + 1, comment, false);
* Highlight lines to start or end delimiter
     private void highlightLinesAfter(String content, int line)
                                                            throws BadLocationException{
          int offset = rootElement.getElement( line ).getEndOffset();
          // Start/End delimiter not found, nothing to do
          int startDelimiter = indexOf( content, getStartDelimiter(), offset );
          int endDelimiter = indexOf( content, getEndDelimiter(), offset );
          if (startDelimiter < 0)     startDelimiter = content.length();
          if (endDelimiter < 0)endDelimiter = content.length();
          int delimiter = Math.min(startDelimiter, endDelimiter);
          if (delimiter < offset)return;
          // Start/End delimiter found, reapply highlighting
          int endLine = rootElement.getElementIndex( delimiter );
               for (int i = line + 1; i < endLine; i++){
                    Element branch = rootElement.getElement( i );
                    Element leaf = doc.getCharacterElement( branch.getStartOffset() );
                    AttributeSet as = leaf.getAttributes();
                    if ( as.isEqual(comment) )applyHighlighting(content, i);
* Parse the line to determine the appropriate highlighting
     private void applyHighlighting(String content, int line)
                                                         throws BadLocationException{
          int startOffset = rootElement.getElement( line ).getStartOffset();
          int endOffset = rootElement.getElement( line ).getEndOffset() - 1;
          int lineLength = endOffset - startOffset;
          int contentLength = content.length();
               if (endOffset >= contentLength)endOffset = contentLength - 1;
          // check for multi line comments
          // (always set the comment attribute for the entire line)
             if (endingMultiLineComment(content, startOffset, endOffset)
            ||isMultiLineComment()||startingMultiLineComment(content, startOffset, endOffset)){
                     doc.setCharacterAttributes(startOffset, endOffset - startOffset + 1, comment, false);
                     return;
          // set normal attributes for the line
          doc.setCharacterAttributes(startOffset, lineLength, normal, true);
          // check for single line comment
          int index = content.indexOf(getSingleLineDelimiter(), startOffset);
               if ( (index > -1) && (index < endOffset) ){
                    doc.setCharacterAttributes(index, endOffset - index + 1, comment, false);
                    endOffset = index - 1;
          // check for tokens
          checkForTokens(content, startOffset, endOffset);
* Does this line contain the start delimiter
     private boolean startingMultiLineComment(String content, int startOffset, int endOffset)
                                                                                                          throws BadLocationException{
          int index = indexOf( content, getStartDelimiter(), startOffset );
               if ( (index < 0) || (index > endOffset) )return false;
               else{
                    setMultiLineComment( true );
                    return true;
* Does this line contain the end delimiter
     private boolean endingMultiLineComment(String content, int startOffset, int endOffset)
                                                                                                         throws BadLocationException{
          int index = indexOf( content, getEndDelimiter(), startOffset );
               if ( (index < 0) || (index > endOffset) )return false;
               else{
                    setMultiLineComment( false );
                    return true;
* We have found a start delimiter
* and are still searching for the end delimiter
     private boolean isMultiLineComment(){
          return multiLineComment;
     private void setMultiLineComment(boolean value){
          multiLineComment = value;
* Parse the line for tokens to highlight
     private void checkForTokens(String content, int startOffset, int endOffset){
          while (startOffset <= endOffset){
          // skip the delimiters to find the start of a new token
               while (isDelimiter(content.substring(startOffset, startOffset+1))){
                    if (startOffset < endOffset)startOffset++;
                    else return;
          // Extract and process the entire token
          if (isQuoteDelimiter( content.substring(startOffset, startOffset + 1)))
               startOffset = getQuoteToken(content, startOffset, endOffset);
          else startOffset = getOtherToken(content, startOffset, endOffset);
     private int getQuoteToken(String content, int startOffset, int endOffset){
          String quoteDelimiter = content.substring(startOffset, startOffset + 1);
          String escapeString = getEscapeString(quoteDelimiter);
          int index;
          int endOfQuote = startOffset;
          // skip over the escape quotes in this quote
          index = content.indexOf(escapeString, endOfQuote + 1);
               while ( (index > -1) && (index < endOffset) ){
                    endOfQuote = index + 1;
                    index = content.indexOf(escapeString, endOfQuote);
          // now find the matching delimiter
          index = content.indexOf(quoteDelimiter, endOfQuote + 1);
               if ( (index < 0) || (index > endOffset) )endOfQuote = endOffset;
               else endOfQuote = index;
          doc.setCharacterAttributes(startOffset, endOfQuote-startOffset+1, quote, false);
     return endOfQuote + 1;
     private int getOtherToken(String content, int startOffset, int endOffset){
          int endOfToken = startOffset + 1;
          while (endOfToken <= endOffset ){
               if (isDelimiter(content.substring(endOfToken, endOfToken+1)))break;
               endOfToken++;
          String token = content.substring(startOffset, endOfToken);
               if ( isKeyword( token ) )
                    doc.setCharacterAttributes(startOffset, endOfToken-startOffset, keyword, false);
          return endOfToken + 1;
* Assume the needle will the found at the start/end of the line
     private int indexOf(String content, String needle, int offset){
          int index;
               while ( (index = content.indexOf(needle, offset)) != -1 ){
                    String text = getLine( content, index ).trim();
                         if (text.startsWith(needle) || text.endsWith(needle))break;
                         else offset = index + 1;
          return index;
* Assume the needle will the found at the start/end of the line
     private int lastIndexOf(String content, String needle, int offset){
          int index;
          while ( (index = content.lastIndexOf(needle, offset)) != -1 ){
               String text = getLine( content, index ).trim();
                    if (text.startsWith(needle) || text.endsWith(needle))break;
                    else offset = index - 1;
          return index;
     private String getLine(String content, int offset){
          int line = rootElement.getElementIndex( offset );
          Element lineElement = rootElement.getElement( line );
          int start = lineElement.getStartOffset();
          int end = lineElement.getEndOffset();
          return content.substring(start, end - 1);
* Override for other languages
     protected boolean isDelimiter(String character){
          String operands = ";:{}()[]+-/%<=>!&|^~*";
               if (Character.isWhitespace( character.charAt(0) ) ||
                                        operands.indexOf(character)!= -1 ) return true;
               else return false;
* Override for other languages
     protected boolean isQuoteDelimiter(String character){
          String quoteDelimiters = "\"'";
               if (quoteDelimiters.indexOf(character) < 0) return false;
               else return true;
* Override for other languages
     protected boolean isKeyword(String token){
          Object o = keywords.get( token );
          return o == null ? false : true;
* Override for other languages
     protected String getStartDelimiter(){
          return "/*";
* Override for other languages
     protected String getEndDelimiter(){
          return "*/";
* Override for other languages
     protected String getSingleLineDelimiter(){
          return "//";
* Override for other languages
     protected String getEscapeString(String quoteDelimiter){
          return "\\" + quoteDelimiter;
     protected String addMatchingBrace(int offset) throws BadLocationException{
          StringBuffer whiteSpace = new StringBuffer();
          int line = rootElement.getElementIndex( offset );
          int i = rootElement.getElement(line).getStartOffset();
               while (true){
                    String temp = doc.getText(i, 1);
                         if (temp.equals(" ") || temp.equals("\t")){
                              whiteSpace.append(temp);
                            i++;
                         else break;
          return "{\n" + whiteSpace.toString() + "\t\n" + whiteSpace.toString() + "}";
public class MyJavac extends JFrame implements ActionListener{
   JPanel top, main;
     JEditorPane edit = new JEditorPane();
   Highlighter syntax = new Highlighter();
   JButton []buts = new JButton[7];
   String theText="";
public MyJavac(){
   super("Java Based Text Editor");
   getContentPane().setLayout(new BorderLayout() );
   String []str = {"New","Open","Save","Save As","Compile","J/Frame","Applet"};
   String []tooltips = {"<html><center>Open a new <br>java file</center></html>",
                        "<html><center>Open an existing<br>java file</center></html>",
                        "<html><center>Save java<br>file</center></html>",
                        "<html><center>Save java file<br>with new filename</center></html>",
                        "<html><center>Run the javac<br>DOS compiler</center></html>",
                        "<html><center>Run java JFrame<br>or Frame application</center></html>",
                        "<html><center>Run java Applet<br>html application</center></html>"};
   top = new JPanel();
   top.setLayout(new GridLayout(1,7,5,0) );
   JPanel east = new JPanel();
   JPanel west = new JPanel();
      for(int i=0; i<buts.length; i++){
         buts[i] = new JButton(str);
buts[i].setToolTipText(tooltips[i]);
buts[i].addActionListener(this);
top.add(buts[i]);
main = new JPanel();
main.setLayout(new GridLayout(1,1) );
     edit.setEditorKit(new StyledEditorKit());
     edit.setDocument(syntax);
     JScrollPane scroll=new JScrollPane(edit);
main.add(scroll);
getContentPane().add("North",top);
getContentPane().add("Center",main);
public void actionPerformed(ActionEvent e){
String option = e.getActionCommand();
if(option.equals("New")){}
if(option.equals("Open")) {
JFileChooser chooser = new JFileChooser();
int returnVal = chooser.showOpenDialog(this);
if(returnVal == JFileChooser.APPROVE_OPTION);
try {
getFromFile();
catch(Exception f){
String error1= "Error opening the file ";
String error2 = "or the file was not found";
JOptionPane.showMessageDialog(null, error1 +"\n" + error2);
edit.setText(theText);
public void getFromFile() throws Exception{
int reader = 0;
theText = "";
FileReader in = new FileReader("junk.txt");
do {
reader = in.read();
theText += (char)reader;
} while (reader != -1);
in.close();
public static void main(String args[]){
MyJavac jav = new MyJavac();
     Image onFrame = Toolkit.getDefaultToolkit().getImage("flag.gif") ;
jav.setIconImage(onFrame);
     jav.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
     jav.setSize(600,400);
     jav.setVisible(true);

Similar Messages

  • Creating a small HTML-Editor using JEditorPane

    Hello! I'm trying to create a small HTML-Editor. Via this editor users shall be capable to create formatted text (bold, italic, underlined, different sizes, different fonts, different colors). Furthermore, if the user pushes the enter-button a new line-break (<br>) shall be inserted. Basically my editor is working but with some big problems:
    1. When I create an instance of my editor, I initialize it with some html-code.
    this.m_EditorPane.setText("<html><head></head><body></body></html>"); Without this initialization between the <body> and </body> <p> and </p> will be inserted, what I don't want. But if I push now the enter-button at the beginning, <br>-tag will not be inserted in the <body>-area but in the <head>-area.
    2. Styling text is working really good, but when I insert a line-break (via enter-button), the <br>-tag is inserted after the (e.g.) closing bold-tag (</b>). So, in the next line, this style-property must be reselected.
    Can anybody help me to change this behavior?
    Kind regards, Stefan
    P.S. The way I insert the <br>-tag:
    JEditorPane editor = getEditor(ae);
    HTMLDocument doc = getHTMLDocument(editor);
    HTMLEditorKit kit = getHTMLEditorKit(editor);
    editor.replaceSelection("");
    int offset = editor.getCaretPosition();
    kit.insertHTML(doc, offset, "<br>", 0, 0, HTML.Tag.BR);
    editor.getCaret().setDot(editor.getCaretPosition());P.P.S. Sorry for my bad english :-/

    Hello! I'm trying to create a small HTML-Editor. Via this editor users shall be capable to create formatted text (bold, italic, underlined, different sizes, different fonts, different colors). Furthermore, if the user pushes the enter-button a new line-break (<br>) shall be inserted. Basically my editor is working but with some big problems:
    1. When I create an instance of my editor, I initialize it with some html-code.
    this.m_EditorPane.setText("<html><head></head><body></body></html>"); Without this initialization between the <body> and </body> <p> and </p> will be inserted, what I don't want. But if I push now the enter-button at the beginning, <br>-tag will not be inserted in the <body>-area but in the <head>-area.
    2. Styling text is working really good, but when I insert a line-break (via enter-button), the <br>-tag is inserted after the (e.g.) closing bold-tag (</b>). So, in the next line, this style-property must be reselected.
    Can anybody help me to change this behavior?
    Kind regards, Stefan
    P.S. The way I insert the <br>-tag:
    JEditorPane editor = getEditor(ae);
    HTMLDocument doc = getHTMLDocument(editor);
    HTMLEditorKit kit = getHTMLEditorKit(editor);
    editor.replaceSelection("");
    int offset = editor.getCaretPosition();
    kit.insertHTML(doc, offset, "<br>", 0, 0, HTML.Tag.BR);
    editor.getCaret().setDot(editor.getCaretPosition());P.P.S. Sorry for my bad english :-/

  • How to create a WYSIWIG HTML editor

    I need to create a WYSIWIG HTML editor and I'm thinking of using Swing.
    I realise many have done this before and that there are products already on the market ranging from Coffee Cup to Dreamweaver.
    However, this will be for a specific application where my users will need to drop some composite objects on to the web page -- these objects will generate chunks of HTML containing some of my own attributes with a special syntax. These objects might be as simple as a textbox with a label, or something more complex.
    So the idea is that the user selects the object they wish to create by clicking a particular icon in a palette. The cursor changes to a cross-hair as the mouse is moved across some sort of canvas pane. The user clicks where they want the top left-hand corner of the object to be (rubber banding not necessary). A dialogue pops up asking for some context-sensitive properties for the object. At this point, the system can work out the HTML object it needs to create, i.e. tags, attributes, etc.
    So far the canvas pane has acted as a simple drawing surface, perhaps with a set of grid lines to aid the user in positioning. But at this point, know that we know the HTML object required, I want it to be rendered on the pane as HTML.
    Is it possible for a pane to be both a canvas an an HTML renderer like this, so that I can achieve a true WYSIWYG effect ? Does anyone understand what I'm talking about ?! Are there any examples of how I would go about this ?
    Thanks

    Is it possible for a pane to be both a canvas an an HTML renderer like this, so that I can achieve a true WYSIWYG effect ? Does anyone understand what I'm Check out JEditorPane and JTextPane for HTML support. You have to do JEditorPane.setEditable(false) to make it render html. It also SUCKS as a web container - no support for style sheets, forms, javascript, etc.
    It is definitely possible to add components into or over the JEditorPane to show lines and other things. I'm just not sure what the point of this is.

  • Creating a WYSIWYG HTML editor

    quick question:
    I'm creating an HTML editor using JTextPane for my GUI and an HTMLEditorKit in the back. I'm just running a simple test with the following html file:
    <html>
      <head>
      </head>
      <body>
        <p>
          let's make a web page
        </p>
        <p>
        </p>
        <p>
          <b>just to see if this works</b>
        </p>
      </body>
    </html>I'm calling
    HTMLEditorKit editorKit = new HTMLEditorKit();
    HTMLDocument doc = (HTMLDocument) editorKit.createDefaultDocument();
    editorKit.read(m_reader, this.getDoc(), 0);where m_reader is a FileReader linked to the above file.
    Then I'm using that as the content for my JTextPane by saying
    textPane = new JTextPane(doc);Then when I do a System.out.print(textPane.getText()), I get:
    <html>
      <head>
      </head>
      <body>
        <p>
        </p>
      </body>
    </html>any ideas?

    Originally posted by: aullah.thinkanalytics.com
    Jai Kejriwal wrote:
    > I am trying to create a WYSIWYG HTML editor. For text boxes, I thought it
    > would
    > be best to use the swt text widget that could be dragged and dropped.
    > However,
    > the text widget needs to have a Composite that it can be added on to. Does
    > this
    > mean that I will have to create my own visual representation of a text
    > widget by
    > extending the Figure class?
    > Also, if you all have any experience/ideas of how I should proceed with
    > creating a WYSIWYG
    > HTML editor, I welcome your input. Particularly, what layout should I use
    > for the base page,
    > and how should I handle code generation. I am a newbie so the help means a
    > lot.
    I'd create my own Draw2D figure to render text boxes and other html
    elements. SWT widgets can't (as far as I know) be embedded in the GEF
    GrapicalViewer's main (SWT) control. You're building blocks are Draw2D
    figures. A nice emulated lightweight solution (c.f swing).
    The other great advantage, is that a figure based TextField gives you the
    the ability to style the appearance of the textbox, ie border, colour, etc.
    You could create a base figure styling interface.
    The TextField or TextBox, could be based on a draw2d.text FlowFigure.
    You're also going to need to have some form of FlowLayout for the page,
    to emulate how elements flow on a HTML page in a browser.
    I guess the Logic Diagram labels are a good place to start looking.

  • WYSIWYG HTML Editor code

    I was reading a lot of old messages in this forum and there was some about people who had created a WYSIWYG HTML Editor. They were willing to share the code. I'm insteresting in how a good such editor are build... Is there anyone who wants to share such an editor to me?

    I'm insteresting in how a good such editor are build...
    Is there anyone who wants to share such an editor to me?The HTML-Editor Ekit is under the Gnu Public Licence.
    You can download the source code from their website:
    http://www.hexidec.com/ekit.php
    Did you search such a thing?
    Marcus

  • [KM] HTML editor

    Hello,
    Anybody know, why documents created directly in KM can be editable by html editor and document uploaded to KM by webdav can be not? (both are simple html docs)
    What is the difference between those 2 types of documents?
    regards
    Artur

    Well the reason is just as disturbing:
    The HTML editor lacks a bunch of features that you would expect from a normal HTML editor. The problem is that in many cases it's not capable of showing HTML created with a HTML editor outside of the portal. It's simply not capable of recognizing all the tags and would probably just mess the HTML up.
    So instead of giving us a decent HTML editor, SAP made a workaround which only makes it posssible to edit HTML files that was original created in the KM editor...
    cheers,
    Vegard

  • Creating and HTML Editor

    Hello, does anybody have and example about how to create an html editor that suports tables, images, fonts?
    I have to create one.
    thanks.

    http://www.hexidec.com/ekit.php
    Is open source - so you might be able to look at their source code.

  • Need help creating message in HTML Standard Editor Item

    Hi,
    I have a requirement in which from page 1 using javascript I have to create a message with link into the HTML Editor Item on the different page on different application.
    everything works fine except when i compose a message which has a link eg. http://www.yahoo.com, it cuts off at http .
    please help me creating and passing link using javascript.
    Thanks,
    --K                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    This is a problem with passing a colon, see here for some solutions:
    problems when copying item from a page to another one
    passing string with a colon in it via a url

  • How to create an HTML editor on Apex with the buttons for editing?

    Hi,
    I would like to have an online editor similar to the one I am using to post this thread with a bold, itallic and links button.
    I see there are HTML editor items, however it doesn't have the bold, font buttons when I create the page?
    Below are from the HELP section.
    HTML Editor Standard - Provides more editing functionality, such as font, format and color, than HTML Editor Minimal.
    Text Area with HTML Editor - Provides basic text formatting controls. Note that these controls may not work in all Web browsers.
    Thanks.
    Edited by: Samantha on Oct 21, 2011 2:12 PM

    Hi,
    Thanks. I went to the item area and did not see it after selecting 'Text area'
    Only these items which do not have the cool editing features.
    Textarea
    Textarea (auto-height)
    Textarea with Character Counter
    Textarea with Character Counter & Spellcheck
    Textarea with Spell Checker
    HTML Editor Minimal
    HTML Editor Standard
    Textarea with HTML Editor (deprecated)

  • Launch HTML Editor for creating webi reports - Java sdk

    Is there a way to launch HTML editor directly for creating webi reports..I know we can set the preference for HTML report panel in infoview...but thats not the requirement. I have to launch the HTML or Java report panel editor according to the User selection on the fly....its a customized java code for webi reports.
    Any help on this is appreciated!
    Thanks
    Chenthil

    Guys will this link work to launch the HTML editor....
    desktoplaunch/querywizard/jsp/entry.jsp?skin=skin_standard&docname=&docid=&isNew=true&isModified=&doctoken=we00010000b5d263b7d0a6&repotype=&unvname=&unvid=UnivCUID%3DAZu2kpoiudVOk35pUtr6.qQ%3BUnivName%3DKalvin&unvrepoid=&mode=C&decsep=.&unit=in&lang=en&doctype=wid&viewType=H&isModify=yes

  • Want to create inbuild html editor

    hi all,
    i wanna create inbuild html editor in jsp,
    plz advice me how to this,
    Regards,
    gaurav jain

    Beuh...you should tell us wahere you got stuck with that problem.
    No one's going to tell you how to do this hey...

  • How to print html text created with HTML Editor Standard?

    I would like to print the text I added with the HTML Editor Standard, using advanced printing. I have made up a Word document with a Report Query and a Report Layout, but the text pops up as html text. Also when I use HTML as output the text shows as "p strong hallo /strong /p" (but then with < and >) instead of hallo . I understand what goes wrong, but I am unable to solve it. Is there a way to work around this?
    Thanks a lot, Frits
    Edited by: user3829016 on 10-nov-2009 5:51
    Edited by: user3829016 on 10-nov-2009 5:52
    Edited by: user3829016 on 10-nov-2009 5:53

    Thanks Lilly a lot!
    I forgot about this tag. It helps in my situation.
    P.S. I tried to solve problem with help of tag <pre> in such way:
    some_word<pre>     </pre>some_wordBut it didn`t helped.
    Thank you again

  • Textarea with HTML editor is not working

    Hi all,
    This is producing me a real headache.
    I created the simplest application in the world with one Textarea with HTML editor, and the editor control does not show the usual tool bar for fonts, color, alignment, etc. Just a ordinary textarea.
    Moreover, this was working before... I moved to another location in my work (me, not the server). Yes, I thought about the Internet Explorer, but Firefox has the same issue.
    So any idea I can try to make this work?
    I have another applications already in production with the same issue.
    Need help!!!!!!!!!
    Thanks in advance.
    Lukas.
    Application Express 2.1.0.00.39
    Oracle Database 10g Express Edition Release 10.2.0.1.0
    Internet Explorer 7.0.5730.11
    Firefox 1.5.0.11
    Windows XP Service Pack 2
    1 G Ram
    Pentium D CPU 2.80GHz

    Lukas,
    I would go and integrate FCKEDITOR (http://www.fckeditor.net/ ) into your application.
    Here are instructions on how to achieve this (sorry but only in German):
    http://www.oracle.com/global/de/community/tipps/einbinden_fckeditor/index.html
    It basically means:
    1) copying the files from fckeditor under the /images directory
    (you can use the instructions here: http://daust.blogspot.com/2006/03/where-are-images-of-application.html)
    2) creating two shortcuts INCLUDE_EDITOR_SCRIPTS and EDITOR
    3) placing the shortcut INCLUDE_EDITOR_SCRIPTS into the page html header and
    4) placing the shortcut EDITOR into the post element text of your plain textarea element
    That's it.
    BTW, FCKEDITOR has been included in Apex 3.0 as a standard item type.
    Regards,
    ~Dietmar.

  • Run script in HTML editor in WebView WP8.1

    I am developing an app in which I need to give HTML editing facility to the user. So I tried different HTML editors but finally TinyMCE was able to show controls for editing. But I am not able to set the contents of Editor. It gives Exception Exception
    from HRESULT: 0x80020101. And I tried all different solutions but could not figure it out. Here is link to my project
        string tinyMice = "<script type='text/javascript'> function myfun() {tinymce.execCommand('mceInsertContent', false, getQueryStrings());}myfun()</script>";
                        await System.Threading.Tasks.Task.Delay(TimeSpan.FromSeconds(1));
                        await webview_demo.InvokeScriptAsync("eval", new string[] { tinyMice });
    Can somebody help?

    hey,
    I am not sure what you exactly want to do but I took a look at the project you uploaded.
    First of all, you better use the NavigationCompleted or
    FrameNavigationCompleted event for executing onload functions.
    I have no idea about the tinymce js plugin but here is what I did to create a similar scenario.
    1) First, create a js function in the removeformat.html to return a string (replacing your getQueryStrings functions)
    function returnMessageValue() {
    return "Hello JS World";
    2) then create a script notify event handler and wire it up to the page so we can get alerts from the html page loaded.
    In NavigationCompleted event:
    string result = await this.webview_demo.InvokeScriptAsync("eval", new string[] { "window.alert = function (AlertMessage) {window.external.notify(AlertMessage)}" });
    this will notify the webview about window.alert's. So we subscribe to the Script notify event:
    webview_demo.ScriptNotify += (sender, args) =>
    MessageDialog m = new MessageDialog(args.Value);
    m.ShowAsync();
    and finally the code execution for our function:
    await webview_demo.InvokeScriptAsync("eval", new[] { "window.alert(returnMessageValue())" });
    // await webview_demo.InvokeScriptAsync("eval",
    // new[] { "tinymce.execCommand(\"mceInsertContent\", false, getQueryStrings())" });
    result:
    hope it helps
    Can Bilgin
    Blog
    Samples CompuSight

  • Wrong behaviour in link generated by HTML editor

    Hi all,
    anybody knows if there is some bug in HTML editor used in XML Form Builder projects?
    We are facing the following problem:
    1) we create a link by filling the html editor area in a news XML edit form
    2) save and publish the news
    3) in rendering of the news the link doesn't respect the CSS class used for links (e.g. the link is a standard link, blue and underline)
    Is it a standard behaviour or not?
    Thanks
    Marta

    Hi all,
    anybody knows if there is some bug in HTML editor used in XML Form Builder projects?
    We are facing the following problem:
    1) we create a link by filling the html editor area in a news XML edit form
    2) save and publish the news
    3) in rendering of the news the link doesn't respect the CSS class used for links (e.g. the link is a standard link, blue and underline)
    Is it a standard behaviour or not?
    Thanks
    Marta

Maybe you are looking for

  • Transfer everything from g4 to g5 or mac pro

    Depending on how much my wife is going to spend. I have two screens with an ex drive. would a networking do or backing everything on disc. My concerns are logic and plugins. All my song projects are on the ex drive. Any input would help. Thanks Bill

  • Dang! Here we go again!

    I had everything going great. Premiere saw my camera, I was able to upload video, g*d was in his heaven and all was right with the world, etc. But last night I installed my Corel Draw Graphics Suite 12, which no doubt you all know something about. I

  • In Sharepoint 2013 Workflows, can a task be re-assigned?

    I find that in SharePoint 2013 SP Designer based workflows, I can not find the settings to make the workflow tasks re-assignable. This was possible in 2010, I can't find how or where to check off 're-assign task'. Thanks, Roy Kim

  • Camera RAW Support for Canon 7D Mark II

    Hi, I've just purchased the Canon 7D Mark II, connected it to my PC, but then found that Adobe Camera RAW doesn't support it yet. Any updates when this camera might be possibly supported? 

  • Short Dump when loading data (Runtime Error ITAB_DUPLICATE_KEY) Urgent Pls

    Dear Guru We are loading data into (2 ODS and ! Cube) from one Infopkg. When i do delta update it throws following error (for one ODS it is green) and for another ODS and CUBE it is red. Runtime Error          ITAB_DUPLICATE_KEY