JEditorPane HTML Question

Hi,
I have a JEditorPane that I am using to display various HTML pages that I programatically generate. When the user selects a menu item, the HTML page changes. I change the HTML page by calling the JEditorPane.setText() method. All that works fine, but I am running into some funny behavior. When I show a new HTML page, the JEditorPane seems to jump the scrollbar so that you are looking at the very bottom of the html page. I tried to call scrollRectToVisible() just after setText(), but that doesn't seem to do anything. Does anyone know how I can make the JEditorPane scroll to the top of the page when I change the text? Thanks a lot. Any help is appreciated.
--Reg                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Hey bbritta,
Thanks, that did it. I guess it helps to read the docs more!!

Similar Messages

  • Puting into JEditorPane HTML file

    I want to put into JEditorPane HTML file from my local drive.
    How to do that?

    Hear is example try it.
    *(c)pesilEX - 2007
    * [email protected]
    * Let�s make a open source software world
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.net.URL;
    public class pesilEX extends JFrame implements ActionListener{
    JPanel cp;
    // Declaring a url to get file name
    // Also this can use to get url form online
    public URL helpURL;
    JScrollPane scrol;
    JEditorPane htmlPane;
    JButton btn1;
    // This string is use to store file name
    String fileName;
    public pesilEX(){
         cp = (JPanel)getContentPane();
         cp.setLayout(null);
    htmlPane = new JEditorPane();
    htmlPane.setEditable(false);
    scrol = new JScrollPane();
    scrol.getViewport().add(htmlPane);
    scrol.setBounds(10,10,370,300);
    cp.add(scrol);
    btn1 = new JButton("View!");
    btn1.setBounds(260,320,120,20);
    cp.add(btn1);
    btn1.addActionListener(this);
    public void actionPerformed(ActionEvent e){
         if(e.getSource()==btn1){
         // File name you can replace is as you want
    fileName = "pesilEX/help.htm";
    // Import html file to java
         helpURL = getClass().getClassLoader().getResource(fileName);
    try{
    // Set url to JEditorPane
         htmlPane.setPage(helpURL);
    catch(Exception er){
         System.out.println(er.toString());
    public static void main(String[] args){
    pesilEX pesil = new pesilEX();
              pesil.setSize(400,400);
              pesil.setTitle("pesilEX JHtml viewer");
              pesil.setResizable(false);
              pesil.setVisible(true);
    }

  • JEditorPane html display problem

    Hello,
    I'm running a JEditorPane inside an Applet for a project im working on. The source included below is an over-simplified version that produces the same results. The problem i'm having is that the html displays in an odd fasion in the JEditorPane.
    Since I cant include a screenshot let me attempt to describe it. Regardless of the FONT face in the html the paragraph displays as you would expect in the JEditorPane until the last line. The last has extra horizontal space separating it from the rest of the paragraph. This seems completely arbitrary. There is nothing in the html code near the line break.
    I've linked this problem to the font face attribute tags. Regardless of the font I choose it displays improperly. Any idea on how to remove this spacing problem in my JEditorPane?
    I'm using NetBeans 3.5.1 and SDK 1.4.2. I've tested this problem in the AppletViewer as well as online in a web browser.
    * CourierTest.java
    * Created on July 24, 2004, 8:28 PM
    import java.awt.Font;
    import java.io.*;
    * @author LD Miller
    public class CourierTest extends javax.swing.JApplet {
    String html;
    /** Initializes the applet CourierTest */
    public void init() {
    initComponents();
    html = "<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><FONT size=3><FONT face=\"Times New Roman\">What is event-driven programming?It is a <I>computer programming</I> paradigm that is different from traditional, sequential programming. In traditional, sequential programming, one could follow the program and plot out exactly the sequence of execution of the program. However, in event-driven programming, it is not possible to plot out exactly the sequence of execution of the program since flow of the execution is determined by the events. Event-driven programming allows a program to interact with users and re-act to user-generated events in a more efficient and effective manner. </FONT></FONT></P>";
    jTextPane1.setContentType("text/html");
    jTextPane1.setText(html);
    /** This method is called from within the init() method to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    private void initComponents() {
    jScrollPane1 = new javax.swing.JScrollPane();
    jTextPane1 = new javax.swing.JTextPane();
    jScrollPane1.setViewportView(jTextPane1);
    getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
    // Variables declaration - do not modify
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextPane jTextPane1;
    // End of variables declaration

    1) I have complex html page (having lot of html controls).
    .when i resize the container, controls gets overlapped.
    shall we avoid this? to my experience JEditorPane deviates from the display of typical browsers when HTML is displayed that contains complex table layouts (tables nested in other tables or non-explicit or non-existent size expressions in tables for instance). I recommend to try and simplify layout complexity as a workaround. Start with a most simple page and increase complexitiy until display gets unsatisfactory.
    2) I used JEditorPane. My html contents are stored in
    text. i called setText()...whether i need to use
    HTMLDocument, HTMLEditorKit etc...to render
    html in better way...I did not understand your second point, what is the question?
    Ulrich

  • JEditorPane & HTML img rendering

    Hi folks,
    I was trying to render some HTML with images in it, trying to get the text to flow around the image but so far it has not worked. The HTML in question is not at all complicated, it is a simple <img align='left' .... > followed by text. Unfortunately, it seems like the component is ignoring the align attribute.
    Anyone has any ideas on how to correct this, or wether I'm simply doing something wrong?
    To try to clarify my problem:
    This is how it should be displayed:
    Line of text 1
    |         | Line of text 2
    |  Image  | Line of text 3
    |_________| Line of text 4
    Line of text 5...and this is how it renders it:
    Line of text1
    |         |
    |  Image  |
    |_________| Line of text 2
    Line of text 3
    Line of text 4
    Line of text 5I'd appreciate any help.

    Try this example.
    regards,
    Stas
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.text.FlowView.*;
    public class Test extends JFrame{
        JEditorPane pane=new JEditorPane();
        public Test() throws Exception{
            this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            this.getContentPane().add(new JScrollPane(pane));
            pane.setEditorKit(new MyEditorKit());
            MutableAttributeSet attrs=new SimpleAttributeSet();
            pane.getDocument().insertString(0,"Align left flow test flow test flow test flow test flow test flow test flow test flow test flow test flow test\n",null);
            attrs=new SimpleAttributeSet();
            ImageIcon img=new ImageIcon("c:/test.jpg");
            StyleConstants.setIcon(attrs,img);
            pane.getDocument().insertString(0," ",attrs);
    pane.getDocument().insertString(0,"\n\n",null);
            pane.getDocument().insertString(0,"Align right flow test flow test flow test flow test flow test flow test flow test flow test flow test flow test\n",null);
            attrs=new SimpleAttributeSet();
            StyleConstants.setIcon(attrs,img);
            StyleConstants.setAlignment(attrs,StyleConstants.ALIGN_RIGHT);
            pane.getDocument().insertString(0," ",attrs);
        public static void main(String args[]) throws Exception {
            Test gI = new Test();
            gI.setSize(300, 300);
            gI.setLocationRelativeTo(null);
            gI.setVisible(true);
    class MyEditorKit extends StyledEditorKit {
        ViewFactory defaultFactory=new StyledViewFactory();;
        public ViewFactory getViewFactory() {
            return defaultFactory;
        static class StyledViewFactory implements ViewFactory {
            public View create(Element elem) {
                String kind = elem.getName();
                if (kind != null) {
                    if (kind.equals(AbstractDocument.ContentElementName)) {
                        return new LabelView(elem);
                    } else if (kind.equals(AbstractDocument.ParagraphElementName)) {
                        return new MyParagraphView(elem);
                    } else if (kind.equals(AbstractDocument.SectionElementName)) {
                        return new BoxView(elem, View.Y_AXIS);
                    } else if (kind.equals(StyleConstants.ComponentElementName)) {
                        return new ComponentView(elem);
                    } else if (kind.equals(StyleConstants.IconElementName)) {
                        return new IconView(elem);
                // default to text display
                return new LabelView(elem);
    class MyParagraphView extends ParagraphView {
        ImageIcon icon=null;
        int iconWidth=0;
        int restHeight=0;
        int imgAlign=StyleConstants.ALIGN_LEFT;
        public MyParagraphView(Element elem) {
            super(elem);
            strategy = new MyFlowStrategy();
        public void paint(Graphics g, Shape a) {
            super.paint(g,a);
            if (icon!=null) {
                Rectangle rect = a.getBounds();
                rect.width -= iconWidth;
                int x = rect.x;
                if (imgAlign == StyleConstants.ALIGN_RIGHT) {
                    x += rect.width;
                g.drawImage(icon.getImage(), x, rect.y, null);
        protected void layout(int width, int height) {
            super.layout(width,height);
        public int getFlowSpan(int index) {
            int span= super.getFlowSpan(index);
            if (restHeight>0) {
                span-=iconWidth;
            return span;
        public int getFlowStart(int index) {
            int span=  super.getFlowStart(index);
            if (restHeight>0) {
                span+=iconWidth;
            return span;
        protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) {
            super.layoutMinorAxis(targetSpan,axis,offsets,spans);
            if (imgAlign==StyleConstants.ALIGN_LEFT && icon!=null) {
                restHeight=icon.getIconHeight();
                int i=0;
                while (restHeight>0 && i<offsets.length) {
                    offsets[i]+=iconWidth;
                    i++;
                    View row=this.getView(i);
                    if (row!=null) {
                        restHeight -= row.getPreferredSpan(View.Y_AXIS);
        public class MyFlowStrategy extends FlowStrategy {
            protected View createView(FlowView fv, int startOffset, int spanLeft, int rowIndex) {
                View v=super.createView(fv,startOffset,spanLeft,rowIndex);
                while (v instanceof IconView) {
                    v=super.createView(fv,startOffset+1,spanLeft,rowIndex);
                return v;
            protected int layoutRow(FlowView fv, int rowIndex, int pos) {
                if (rowIndex==0) {
                    int count=getElement().getElementCount();
                    for (int i=0; i<count; i++) {
                        Element el=getElement().getElement(i);
                        Icon ic=StyleConstants.getIcon(el.getAttributes());
                        if (ic!=null) {
                            icon=(ImageIcon)ic;
                            iconWidth=ic.getIconWidth();
                            restHeight=ic.getIconHeight();
                            imgAlign=StyleConstants.getAlignment(el.getAttributes());
                int res=super.layoutRow(fv,rowIndex,pos);
                View row=fv.getView(rowIndex);
                restHeight-=row.getPreferredSpan(View.Y_AXIS);
                return res;
    }

  • JEditorPane HTML link in the same page

    Hi,
    I want to show an HTML page in JEditorPane.
    The HTML page have <a> tags that link to a bookmark in
    the same page, but I can�t show this because I get an error
    like this:
    MalformedURL or similiar.
    I try to do somethig like this:
    public void hyperlinkUpdate(HyperlinkEvent ev)
    ...Editor.setPage(ev.getURL());
    or
    ...Editor.setPage(ev.getDescription());
    without results.
    How can I listen for hyperlinksEvents than link in the same page.
    Thanks

    they dont want to see the first report.
    Is there a way in which the Prompts are also display along with the second report?Then create the same prompt on the second report also.
    Cheers
    Nawneet

  • Javascript/HTML question

    I've been teaching myself Java on and off for the past couple years with the help of these forums and other tutorials. Now I've decided to take on a project that requires the use of HTML and Javascript and I can't seem to find the information I need. I was hoping that somebody from these forums could either answer my questions and/or point me in the right direction to find the answers.
    The project is simple. I created an HTML window with an inputTextArea, an outputTextArea, and two buttons (Submit and Reset). When Submit is pressed I need the program to take the text from inputTextArea one line at a time, check the indexOf a string, and add tags at the beginning and end of the string if it meets certain criteria before appending it to outputTextArea.
    I can (and have) written this very easily in Java but I can't seem to find the methods I need in Javascript. In java I use a java.io LineReader to read the inputTextArea.getText() one line at a time and then make the changes as needed. I actually can't even find a tutorial in Javascript that can explain how to take the text from inputTextArea and print it into outputTextArea.
    So the main thing I need to know is how to read one line of text at a time from the inputTextArea. I think I can figure the rest out.

    That was actually my original thought when I started on the Java version of the program but I couldn't figure out how to enter the the carriage return in as a variable to be indexed. So it wasn't until after I found the LineReader that I was able to complete the Java version.
    Is there some way to enter the carriage return in as a searchable variable?

  • JEditorPane/HTML image loading delay

    I am using a JEditorPane to render HTML to a graphics buffer which I then write as an image file. Since HTML loading is asynchronous I wait for the "page" property change event after calling setPage() before using print() to capture the rendered HTML to a graphics buffer. Unfortunately, the "page" property change event is fired after the HTML is loaded but before images referenced by the HTML are rendered. As a result, the image that I capture has little picture icons in place of the graphics. If I sleep for a short time before capturing the image, it works fine. However, sleeping is not an acceptable solution as there is no way to predict how long I will need to sleep because it varies based on system load and complexity of the HTML being rendered. Is there any way to check if an HTML document has completely loaded including all the images? Does anyone have a better way to capture an image of a rendered HTML document that would not have this problem?
    Below is a code snippet that shows what I am trying to do.
    static final JEditorPane p;
    static final Object done;
    static {
        done=new Object();
        p=new JEditorPane();
        p.setSize(1728, 2156);
        p.addPropertyChangeListener("page", new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) {
            synchronized(done) {
                done.notifyAll();
    static void capture(File htmlFile) {
        BufferedImage img=new BufferedImage(1728, 2156, BufferedImage.TYPE_BYTE_GRAY);
        synchronized(done) {
            p.setPage(htmlFile.toURL());
            try {
                done.wait();
            } catch(InterruptedException e) {}
    /* without this code images are not rendered
        try {
            Thread.sleep(100);
        } catch (InterruptedException ex) {}
        Graphics g=img.createGraphics();
        g.setColor(Color.white);
        g.fillRect(0, 0, 1728, 2156);
        p.print(g);

    HI Sarnoth,
    I'm trying to do something similar and have used your code, but it doesn't work completely for me. Do you see anything that I'm doing wrong? I am trying to save the HTML page as a JPEG image. This is my code and I'm having problems. Anyone have any ideas? It is dying on the je.encode(bi) line. Also, for some reason, if I uncomment the commented out lines, it hangs. Any ideas on that one too?
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.FileNotFoundException;
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.image.BufferedImage;
    import javax.swing.JEditorPane;
    import com.sun.media.jai.codec.ImageCodec;
    import com.sun.media.jai.codec.ImageEncoder;
    import com.sun.media.jai.codec.JPEGEncodeParam;
    public class HTMLPageToImageConverter
         private HTMLPageToImageConverter() {
         static final JEditorPane p;
         static final Object done;
         static {
             done = new Object();
             p = new JEditorPane();
             p.setSize(1728, 2152);
    /*         p.addPropertyChangeListener("page", new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) {
                 synchronized(done) {
                     done.notifyAll();
         static void GenerateHTMLBufferedImage(File htmlFile, BufferedImage img) {
             img = new BufferedImage(1728, 2152, BufferedImage.TYPE_BYTE_GRAY);
             synchronized(done) {
                 try {
                      p.setPage(htmlFile.toURL());
                 } catch(IOException e1) {}
    /*             try {
                     done.wait();
                 } catch(InterruptedException e) { System.out.println("GenerateHTMLBufferedImage InterruptedException"); }
             Graphics g = img.createGraphics();
             g.setColor(Color.white);
             g.fillRect(0, 0, 1728, 2152);
             p.print(g);
         public static boolean SaveHTMLFileToJPEG(String htmlFile, String jpegFile) {
              try {
                   BufferedImage bi = null;
                   GenerateHTMLBufferedImage(new File(htmlFile), bi);
                   FileOutputStream fos = new FileOutputStream(jpegFile);
                   JPEGEncodeParam jp = new JPEGEncodeParam();
                   ImageEncoder je = ImageCodec.createImageEncoder("JPEG", fos, jp);
                   je.encode(bi);
                   fos.close();
              } catch(FileNotFoundException fnfe) { System.out.println("SaveHTMLFileToJPEG FileNotFoundException"); }
                catch(IOException ioe) { System.out.println("SaveHTMLFileToJPEG IOException"); }
              return true;
    }Called from other code
    HTMLPageToImageConverter.SaveHTMLFileToJPEG("d:/page1.html", "d:/page1.jpeg");
    ...Thanks in advence,
    --Ed                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • JEditorPane html

    I have a simple JEditorPane set up so that I can view source code and rendered version of an html page. I toggle between rendered and source view by setting the content type:
    setContentType("text/plain") - displays source code
    setContentType("text/html") - dispalys the rendered view
    The problem I have is with offsets. It would be natural to me that the first letter in the rendered view starts at 0 and ends at 1. That's not the case however. In any test page I have, the first letter has offset 3-4. The same things happen inside the text as well. When I count offsets by hand, they are different that what getSelectionStart() and getSelectionEnd() show.
    I'm assuming that there must be some characters that get rendered by JEditorPane but don't get displayed - but quite frankly I have no clue as to why it's happening.
    Any ideas would be appreciated. I wrote a simple algorithm (irrelevant to this post) that uses the rendred view offsets to mark things in the source view, but since my rendered view offsets are screwed up - I'm not able to mark things properly.
    Thanks
    M

    Have you tried displaying the characters between offsets 0-2 ? It could give you an idea of what it concerns...

  • JEditorPane HTML preview

    Hi,
    I've been working on a small class which will render out HTML. There's a few examples on the web, all of which read an HTML file from a URL. JEditorPane works fine for that use, but when I try to specify HTML content as a string the page doesn't get displayed correctly. It's a bit hard to describe but basically if you specify a document as type text/html it tries to generate it's own <html>, <body> tags etc and leaves yours out. If you do happen to specify your own then it just ignores your page content.
    I need to do it that way as the HTML doesn't exist at a URL, only in memory. Does anyone know of a workaround or has anyone else experienced this problem? I'm developing the application using JDK 1.4.0 under Win2k.
    Thanks

    Yeah that's pretty much exactly what I'm doing, although it's pulling the HTML content from the database first.
    Your code outputs this:
    <html>
    <head>
    </head>
    <body>
    <b>Bolloxs</b>
    </body>
    </html>
    As you can see, it's being altered by the application and has had the <head> tags added. In my application it's doing even more, stripping everything inside of the <body> tags.
    I've found the reason though...it doesn't seem to like a meta tag.
    This content:
    String html = new String("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head><title>This is my title</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"></head><body leftmargin=\"0\" topmargin=\"0\"><table width=\"600\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td>Page content goes here</td></tr></table></body></html>");
    Outputs:
    <html>
    <head>
    </head>
    <body>
    <p>
    </p>
    </body>
    </html>
    Whilst this content (with the meta line removed):
    String html = new String("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head><title>This is my title</title></head><body leftmargin=\"0\" topmargin=\"0\"><table width=\"600\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td>Page content goes here</td></tr></table></body></html>");
    Outputs:
    <html>
    <head>
    <title>This is my title </title>
    </head>
    <body leftmargin="0" topmargin="0">
    <table border="0" cellpadding="0" width="600" cellspacing="0">
    <tr>
    <td>
    Page content goes here
    </td>
    </tr>
    </table>
    </body>
    </html>
    Weirdness!?

  • Preferred size of JEditorPane/ HTML page

    Hi,
    I've loaded an HTML page in a JEditorPane. Since I'm using a layout manager with absolute positioning, I need to know the pane's preferred size.But the preferred size I get is just about (6, 6), although it has a big picture in it. I tried validate() first or to add it with (1,1) to have it set up properly (visible etc.) and then resize it afterwards, but it had no effect. Is there a way to get a preferred size of an HTML page?
    Thanks a lot.
    Greets
    Puce
    Note: Using another layout manager is not a option, since this is a very specialized task.

    I could use this as well. I'm tiling JEditorPanes vertically inside a JPanel using BoxLayout. The problem is that I need to limit the width of the panel, so I need to adjust the sizes accordingly. Any suggestions? I'll give another duke...
    Max

  • Caret position in JEditorPane HTML

    Hi everyone,
    I need the position of caret in HTML source on JEditorPane. I
    The value of getCaretPosition() seems not what I wanted. CaretEvent.getDot() gives the same value of getCaretPosition. These methods only gets position on the view.
    Please help! Thanks a lot!

    It's not possible. HTMLParser creates Document's structure (Elements tree) from html text but it has no relation to content.
    Position in source html isn't correct because it may contain unnecesary space between tags or tab chars or \n chars which are ignored.

  • Another JEditorPane HTML performance thread

    I've seen quite a few posts on the forums about people having serious performance issues using JEditorPane or JTextPane with large text. I haven't seen any solutions or work-arounds mentioned though, so I'm just going to throw this one out there again...
    To sum up the issue, it appears that calling setText() on a JEditorPane or JTextPane is terribly inefficient. At the very least when trying to display HTML content. I have an HTML table that I would like to display in my app. It's not unreasonably large (perhaps 1000 small rows), but the setText() method takes anywhere between 30seconds and 1 minute to execute. During this time, the memory footprint of my skyrockets and the second attempt to call setText() will result in a OutOfMemoryException.
    The issue seems to be captured in the following bug:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4203912
    However, this bug was closed for 1.5 release of Java, and I'm still experiencing the issue on the latest JRE currently available (1.5.0_05).
    The performance as it is now is pretty unreasonable. Does anyone have any sort of work-around? I've heard a custom implementation of the Document mentioned in one of the posts, but no code examples were given.
    Does anyone have any further input / help on this issue?
    Thank you.

    JEditorPane and JTextPane can't handle plain String text directly.
    Their M of MVC is Document.
    Try preparing a full fledged Document object and set it to them panes.

  • Named Anchor in JEditorPane HTML

    I am loading an HTML string into a JEditorPane.
    The string has some named anchors (<A NAME="blah">) that reference other locations in the HTML string.
    Because I am loading the HTML string by using JEditorPane.setText, the named anchors do not work. This seems to be a problem when my HyperLinkListener tries to find the target URL.
    Does anyone know how to solve this problem?

    Did you find a solution for this problem in the meantime? I'd like to implement an online help feature in my newest program. I wrote a HTML text with anchors/links and the program loads this text to an JEditorPAne witch HTMLEditorKit by using the EditorPanes 'read' method. But all I got are HyperLinkExceptions from the HyperlinEventListener.
    regards, hgw2

  • IWeb Newbie: Blog HTML Question

    Hi, I'm relatively new to IWeb and have a question relating to blogs created in Iweb. When I create a new entry for my blog, and try to add a video for youtube (as a link) in place of the default picture, the video does not appear on my main page. I have used the html snippet and see the video on my blog entry page, however it does not appear on my main page. How do I go about including video's in a new blog entry page so I can view them directly from my main (intro) page? Any help would be much appreciated.
    Thanks

    I am using the Modern Frame template for my web site. When I add the blog template, a pre-set template shows up. Is there any way to edit or change it?
    no and yes... no, you can't do much of anything while working inside iweb; yes, you can change it by changing the template xml file. Suzanne Boben at 11Mystics.com have done it for years.
    For example, I would like to change the hyperlink color from red to blue. It won't let me do that. I go to the hyperlink inspector and I can't choose anything.
    outside of changing template xml, this can be done in two ways (beside the above method):
    1) post edit the blog CSS file (search my post for blog CSS), this requires post edit and perhaps after every publishing.
    2) build your own widget to change the blog CSS and you only need to add the widget once. see my example here: http://www.cyclosaurus.com/Home/CyclosaurusBlog/CyclosaurusBlog.html
    the example is done with my widget.
    Also, when I view the web site on my computer, it looks fine, however when I view it on my iphone 3GS it shows an old font that I was using, why?
    iweb fontmapping: http://11mystics.com/2008/10/06/faq-managing-the-way-fonts-display-on-a-windows- pc/

  • JEditorPane HTML load GIF from JAR

    I'm using a jeditorpane to display a html page from a local file system with images in it, will the editor pane load the <img src> tags from a jar file or must the images be on the local file system?

    gifs will have to be on the local drive

Maybe you are looking for

  • I recently went to look at pictures in iphoto and once I click on them I get a black screen with an exclamation point?

    It was fine yesterday?  I can see the photos when I scroll over the "event" in iphoto but when I open it and click on a picture, It gives me a big exclamation point?  Only on recent photos? 

  • N:1 without correlation?

    Hi I am having 2 files in which one file having 20 records and another file is having 10 records I need to merge two files using BPm how can I merge two files without correlation? Any solution regarding this Regards Krishna

  • File Sending Error

    All of the sudden, iChat is not letting me send a file, but it lets me receive them. The person on the other end is getting a message saying it is waiting for me to start, and I usually get an error or it tells me the other person did not accept the

  • Error code = -200462

    I am currently using a CVI routine to do acquisition and generation.  I am using a 9172 chassis and 9205 module for voltage acquisition and 9264 module for voltage generation. I seem to run into an error during the startup of my task in the StartDAQ

  • Color to header materail field in BOM report

    hi experts, I am doing BOM report in that header material of BOM and their component i moved in same field but i cant identity which one is a header material (MAST-MATNR)  and which one is a componental (STPO-IDNRK)  so, I want to color for header ma