HTML Editor

Well, Howard Kistler has certainly already signed with an editor to sell its HTML Editor Applet. So instead of being parasites and begging for code, why not spit in our hands and code it by ourselves ?
I've made some tries yesterday for a HTML editor application. So far, there is an appli where one can edit text, and set it bold or italic with a menu. One can also dump the HTML code to stdout.
Here is the code, it's very simple, and after that I'll have some questions for you.
import javax.swing.*;
import javax.swing.text.*;
import javax.swing.text.html.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class Bla extends JFrame {
    JEditorPane jep;
    Hashtable actions;
    private Action getActionByName(String name) {
        return (Action)(actions.get(name));
    public Bla() {
        jep = new JEditorPane();
        jep.setContentType ("text/html");
        // shouldn't insert HTML test not done with a JEditorPane
        // jep.setText ("This is a <b>test</b> !!");
        // store and display available actions for this Editor Kit
        actions = new Hashtable();
        Action[] actionsArray = jep.getEditorKit().getActions();
        for (int i = 0; i < actionsArray.length; i++) {
            Action a = actionsArray;
actions.put(a.getValue(Action.NAME), a);
System.out.println (a.getValue(Action.NAME) + " = " + a);
System.out.println ("TEST : " + HTMLEditorKit.BOLD_ACTION); // --> "html-bold-action" !!
// builds menu bar
JMenuBar jmb = new JMenuBar();
setJMenuBar (jmb);
JMenu jm = new JMenu("commands");
jmb.add (jm);
jm.add (getActionByName ("font-bold"));
jm.add (getActionByName ("font-italic"));
JMenuItem out = new JMenuItem("output text");
jm.add (out);
out.addActionListener (new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.out.println ("CONTENT : " + jep.getText ());
// insert editor to a scroller and add all that to our frame
JScrollPane scroller = new JScrollPane();
     JViewport port = scroller.getViewport();
     port.add(jep);
getContentPane().add (scroller, BorderLayout.CENTER);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
pack();
setSize (400, 400);
show ();
public static void main (String args[]) {
new Bla();
Questions :
1) When we display HTMLEditorKit.BOLD_ACTION, the result is "html-action-bold" but this action does not exist in the action list that we got from the EditorPane ! Is it a bug or just something I didn't understand ?
2) Is it a comprehensive list of all available actions on an EditorPane ?
3) If you try to set the HTML text by yourself, the Editor won't like it unless it is perfectly structured (usage of <p>, by example). Strange behaviour and bugs will occur if you try it.
4) When the HTML content is sent back, it is enclosed in <html><head></head><body>...</body></html>. What part of the architecure generates this code and how to get rid of it (not by String manipulations, of course).
Thanks for your help. And see you soon for the next version !
Matthieu

I use TextWrangler and I think it rocks - it is completely free, very fast and just nice to use in general. The URL to download is:
http://www.barebones.com/products/textwrangler/download.shtml
Martin Bradford-Gago
Apple Newbie Blog: http://aurora7795.blogspot.com
MacBook, Intel Mac Mini, iMac G3   Mac OS X (10.4.8)   Using Parallels Desktop to connect to Windows XP

Similar Messages

  • 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.

  • 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 :-/

  • Who can help me with replacing the standard HTML editor in WPC?

    Hi all,
    We have chosen to replace the standard HTML Editor in the Web Page Composer by the TinyMCE Editor. I have worked my way through the document written by Boris Magocsi (https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f04b5c5d-3fd2-2a10-8ab0-8fa90e3ac162) and the TinyMCE Editor is diplayed when we add or edit a paragraph.
    However, we can not type any text in the input field anymore and we can not click any of the buttons in the TinyMCE editor. Can anybody help a total Javascript newby with fixing this? Full points will be awarded obviuosly. Thanks in advance!
    Best regards,
    Jan
    Note: We are on NW 7.0 SP 15 and the WPC component is not patched yet. We are trying to complete that today and patch it to patch level 1.

    Snippet from the default trace:
    #1.#005056A13EB000880001D90400005EBC000452C3D2595400#1216900908012#com.sap.engine.services.connector.resource.impl.MCEventHandl
    er#sap.com/irj#com.sap.engine.services.connector.resource.impl.MCEventHandler#JALAROS#631##192.168.17.45_POD_3367950#JALAROS#ef
    efb1f0597211ddc652005056a13eb0#SAPEngine_Application_Thread[impl:3]_25##0#0#Debug##Java###>>> com.sap.engine.services.connector
    .resource.impl.MCEventHandler15c015c --> 5(locTrSupp:false).cleanup({0}), shared: {1},  destroyed {2}, invoked from: {3}#4#tru
    e#false#false#java.lang.Exception
            at java.lang.Throwable.<init>(Throwable.java:58)
            at com.sap.engine.services.connector.Log.getStackTrace(Log.java:61)
            at com.sap.engine.services.connector.resource.impl.MCEventHandler.cleanup(MCEventHandler.java:267)
            at com.sap.engine.services.connector.resource.impl.MCEventHandler.connectionClosed(MCEventHandler.java:524)
            at com.sap.engine.services.dbpool.spi.LocalTXManagedConnectionImpl.removeConnectionHandle(LocalTXManagedConnectionImpl.
    java:322)
            at com.sap.engine.services.dbpool.cci.ConnectionHandle.close(ConnectionHandle.java:278)
            at com.sap.netweaver.config.store.CommonJDBCConfigPersistence.getProperty(CommonJDBCConfigPersistence.java:1120)
            at com.sap.netweaver.config.store.ConfigNode.getProperty(ConfigNode.java:61)
            at com.sap.netweaver.portal.prt.config.cmsource.CMStoreSource.getInternalTimestamp(CMStoreSource.java:1111)
            at com.sap.netweaver.portal.prt.config.cmsource.CMStoreSource.shouldRefresh(CMStoreSource.java:997)
            at com.sap.netweaver.portal.prt.config.cmsource.CMStoreSource.refreshObjects(CMStoreSource.java:1187)
            at com.sap.netweaver.portal.prt.config.cmsource.CMStoreSource.getTimeStamp(CMStoreSource.java:1331)
            at com.sapportals.config.fwk.meta.ConfigurableSourceSynchronizer.synchronizeListeners(ConfigurableSourceSynchronizer.ja
    va:124)
            at com.sapportals.config.fwk.data.ConfigPlugin.synchronizeConfigurablesCache(ConfigPlugin.java:1216)
            at com.sapportals.config.fwk.data.ConfigPlugin.getConfigurables(ConfigPlugin.java:362)
            at com.sap.nw.wpc.km.service.editor.EditorService.getStringConfig(EditorService.java:1119)
            at com.sap.nw.wpc.km.service.editor.EditorService.getImageLayoutSet(EditorService.java:1096)
            at com.sap.nw.wpc.km.service.editor.component.ImageSelectComponent.getCompoundComponent(ImageSelectComponent.java:213)
            at com.sap.nw.wpc.km.service.editor.component.ImageSelectComponent.initializeFromPageContext(ImageSelectComponent.java:
    135)
            at com.sap.nw.wpc.km.service.editor.component.EditorComponentFactory.getComponent(EditorComponentFactory.java:69)
            at com.sap.nw.wpc.km.service.editor.document.AbstractEditorObject.getComponent(AbstractEditorObject.java:162)
            at pagelet.editor._sapportalsjsp_editor.subDoContent(_sapportalsjsp_editor.java:1045)
            at pagelet.editor._sapportalsjsp_editor.doContent(_sapportalsjsp_editor.java:58)
            at pagelet.editor._sapportalsjsp_editor.service(_sapportalsjsp_editor.java:38)
            at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.service(PortalComponentItemFacade.java:360)
            at com.sapportals.portal.prt.core.broker.PortalComponentItem.service(PortalComponentItem.java:934)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:435)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:527)
            at com.sapportals.portal.prt.component.AbstractComponentResponse.include(AbstractComponentResponse.java:89)
            at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:232)
            at com.sapportals.portal.htmlb.page.JSPDynPage.doOutput(JSPDynPage.java:76)
            at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:129)
            at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134)
            at com.sap.nw.wpc.editor.EditorTool.doContent(EditorTool.java:54)
            at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
            at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
            at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
            at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
            at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:645)
            at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
            at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
            at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
            at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:524)
            at java.security.AccessController.doPrivileged(AccessController.java:231)
            at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:407)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
            at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
            at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
            at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
            at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionM
    essageListener.java:33)
            at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
            at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
            at java.security.AccessController.doPrivileged(AccessController.java:207)
            at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
            at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    #1.#005056A13EB000880001D90500005EBC000452C3D25AFC5C#1216900908121#com.sap.engine.services.connector.resource.impl.HandleWrappe
    r#sap.com/irj#com.sap.engine.services.connector.resource.impl.HandleWrapper#JALAROS#631##192.168.17.45_POD_3367950#JALAROS#efef
    b1f0597211ddc652005056a13eb0#SAPEngine_Application_Thread[impl:3]_25##0#0#Debug##Plain###>>> com.sap.engine.services.connector.
    jca.ConnectionManagerImpl3fa63fa6.allocateConnection(mcf: com.sap.engine.services.dbpool.spi.ManagedConnectionFactoryImpla986
    92e1, reqInfo: null)#

  • 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

  • How to configure webforms HTML editor in SAP 4.7 version

    Hello Experts,
    I have been trying to access one of the web forms in sap 4.7 , when i double click the form instead of opening an editor, it is showing me an error ''No HTML editor configured - please complete your personal settings using MS notepad as default''**
    I am stuck any help would appreciated.
    Regards,
    Neeru Sangwan.

    for the result of function module you can check the documentation (from SE37 transaction code)
    Status of User Password (Value: -2/-1/0/1/2/3, see docu.)
    Definition
    Status of the user password (relating to whether it can or must be changed)
    Value Meaning
    -2 Password cannot (generally) be changed
    -1 Password cannot be changed today (only allowed once a day)
    0 Password can be changed, but does not have to be changed
    1 Password is initial and must be changed
    2 Password has expired and must be changed
    3 Password must be changed because it no longer meets the new rules

  • Is there a way to embed an html editor in a webdynpro application?

    Hi,
       I need to create a webdynpro app that has an html editor. I have javascript code(for an html editor) avalaible, but as far as I know there is no way to embed it. Any suggestions? Or is there an existing UI element that I missed?
    Regards,
    Harsh

    hi ,
    Using a Iframe UI u can give the source as the path to this html file(the javascript code). But everytime a event occurs the content i the IFrame UI gets refreshed.
    If u have to just display a content in Iframe UI its fine. If u r planning to navigate inside it ..it wont work out .
    You can fire a exit plug to the javscript code if its the last step in ur application or u can fork a process and create a external window with this url.
    Hope this helps
    Regards
    Bharathwaj

  • Word Wrap functionality in HTML Editor

    Hi,
    Is their any configuration to enable the word wrap functionality in HTML Editor.
    Best Regards,
    Ajay

    Hi Priyaranjan,
    you need to use modules for that. The below link explains step by step a sample for word wrapping in an analysis item.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0f7d724-c0f0-2d10-828f-be249d59b5c3?QuickLink=index&…
    Regards
    Yasemin...

  • How can I use javascript in a Text Area with HTML editor??

    My question is... how can I use javascript in Text Area with HTML editor??
    I can use javascript functions that change the content of Text Areas but i can´t if i try in text area with html editor....
    I need to limit number of characters in a text area with html editor and i can´t.
    could anybody help me please?

    I have been experiencing similar problems with the HTML Editor and have managed to find an answer that should start to answer some of my questions. The Apex HTML Editor Standard is actually an HTML editor called FCKeditor. The FCKeditor has a Javascript API that can be found at http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/JavaScript_API. Unfortuately this doesn't seem to give the whole answer and I found more at http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:49607.
    I needed to get the text entered within my html editor standard (e.g. P1_MYTEXT) and use it within my javascript function. I did this by using the following script
    <script language="JavaScript" type="text/javascript">
    function showtext(){
    var oEditor = FCKeditorAPI.GetInstance('P1_MYTEXT');
    var editortext = escape(oEditor.GetXHTML(oEditor.FormatOutput));
    alert(editortext);
    </script>
    Hope this helps.
    Matthew

  • 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)

  • How could I edit correctly my bullets in my html editor

    I try to manage bullets in a simple HTML Editor.
    To do that, I used two differents methods but they both failed.
    When I look at the generated source code, my tags correcty exist but in the HTMLDocument, I can't see the text well formatted.
    Is anybody could help me?
    Thanks a lot
    Here is the two methods I chose:
    The first one was:
    MutableAttributeSet attr = new SimpleAttributeSet();
    attr.addAttribute(StyleConstants.NameAttribute, style);
    int xStart = m_HTMLEditor.getSelectionStart();
    int xFinish = m_HTMLEditor.getSelectionEnd();
    m_doc.setParagraphAttributes(xStart, xFinish - xStart, attr, false);
    And the second one was:
    try{
         MutableAttributeSet attr = new SimpleAttributeSet();
         attr.addAttribute(StyleConstants.NameAttribute, HTML.Tag.LI);
         m_doc.insertString(m_HTMLEditor.getSelectionStart(), m_HTMLEditor.getSelectedText(), attr);
    catch(Exception ex) {                         IdeMessageManagerAccess.printMessage(IdeMessageType.INFORMATION, "An exception occured during the inserting bullet");
    }

    Hi,
    implementing list formatting for HTMLDocuments is complex. To format an arbirtrary text portion as list, <ul> or <ol> and <li> tags have to be added to respective text.
    As one can not predict if a selected text portion has already list formatting or contains a mixture of list and plain text formatting, there are a lot of cases to implement.
    My proposal is to just copy a working implementation as it is present in application SimplyHTML at http://www.lightdev.com/template.php4?id=3
    Ulrich

  • HTML Editor (FCKEditor) broken in Safari (APEX 3.0)?

    Hi folks,
    When using Safari (3.1.1), FCKEditor does not load for me on page items of type HTML Editor). (It's fine using IE and FF). Safari reports:
    Value undefined (result of expression func) is not object.
    .../i/javascript/htmldb_html_elements.js (line 484)Searching the forum I found this reference:
    AJAX result length > 32000
    In his post there, Dan identifies what may be the problem:
    "correct way to handle this is by using the FCKeditor_OnComplete function instead of an onload call. The function takes one parameter, the FCK Editor instance on the page, which in ApEx seems to have been made 'oFCKeditor';"
    ... but I'm still short of a fix.
    Since FCKEditor is now bundled into APEX, I'd hope that APEX would successfully invoke it on all major browsers.
    Does anybody (Apex team?) know a fix?
    Has this been fixed at 3.1?
    Thanks
    john

    Hello,
    Has this been fixed at 3.1?Yes
    Regards,
    Carl
    blog : http://carlback.blogspot.com/
    apex examples : http://apex.oracle.com/pls/otn/f?p=11933:5

  • Firefox doesn't display my html properly (Like it is looking like on my editor). Explorer displays the page like my html editor.

    Hello,
    I develop my web site with a html editor. When I use preview, everything is fine. If I use Explorer, everything is fine also but if I use Firefox to display the page, the images and text are not where they should be.

    If you use MS software to generate page code then make sure that you disable VML (MS Office) code in the web authoring settings. Otherwise only IE will be able to display that website properly.
    You can see VML as green comments in the View > Page Source.
    See http://en.wikipedia.org/wiki/Vector_Markup_Language

  • Can't get FCKeditorAPI to load to validate HTML Editor contents

    I have an HTML Editor item on my page and wanted to quickly check the length of the text in the editor before submitting the page. It should be possible to get the contents of the HTML Editor using the FCKeditorAPI, but I can't get it to load. I'm doing this by putting basically this in the HTML header:
    <script type="text/javascript">
    function checkLength() {
    var oEditor = FCKeditorAPI.GetInstance('MY_EDITOR');
    alert(oEditor.GetXHTML.length);
    </script>
    Then calling the function when the Save button is clicked. I'm only geting "FCKeditorAPI is not defined" errors, however.

    Hi,
    I have the same problem, because I want to check the number of characters in the editor field before the values are stored.
    And when I tried to get the value of the fckeditor field with document.getElementById(XXX).value; I don`t get the actual value.
    So I have to get the value through the instance of the fckeditor.
    Thanks for your help,
    Tim

  • Printing the data in "Textarea with HTML editor" item in APEX as pdf

    Hello,
    I have a requirement which goes like this.
    The user enters data in the HTML editor in APEX. All the tools available in the HTML toolbar will be used (eg. bulleted points, tables etc.). This data is stored in a single cell in the database. This data needs to be generated as a pdf for printing. We have Apache FOP installed as well.
    When I try to create a report region with this data and export it as pdf, the html tags are not considered. For eg. the table in the HTML editor doesn't appear as a table in the pdf, only the text appears.
    Let me know if such a transformation is possible. Also, can any other tool perform this??
    Note: The data in the HTML editor may not be in a fixed template. Whatever is entered there has to be converted.
    Thanks in advance !!

    The strip HTML attribute is set to "No" already. If you understood clearly, I need to convert the entire data in a HTML editor item to pdf. The data is stored in a single cell as HTML tags in the database. The data may inturn contain HTML tables as well. These HTML tables are not captured in the pdf, only the text within the tables are displayed.

Maybe you are looking for