HTML editor not loading

Help
2013-11-18
2015-11-07
  • Armando Hilel

    Armando Hilel - 2013-11-18

    Hello Christopher,

    I've been using for several month without any problem. However, now the HTML editors are not loading any more.
    As I did not make any change in my project recently, the only possible thing I could think of is that a windows update is causing the problem.
    So far I have tried on Windows 7 professional, Windows 7 Ultimate and Windows 8.1 with the same results.
    (all windows with the most recent packages).
    (SO 64 bits + Java 64 bits)
    A do not think is has any thing to do with the java version I tried with other java versions as well.

    I Also tried your applet and it did not load the HTML editor as well (same problem).

    The FCK editor does not load
    The CK editor seems to be missing from the classpath
    The TinyMCE opens but do not works.

    Editor FCK
    Editor CK
    Console

    I have updated my app to version 1.0.2 but it did not fix the problem

    Is it happening only on my end? Could you point me in the right direction?

    Att.
    Armando

     
  • Christopher Deckers

    Hi Armando,

    The CK editor seems to be missing from the classpath

    Oops, I added it, hopefully that works better.

    Is it happening only on my end?

    I tried it on my system and I also have the same problem.

    Could you point me in the right direction?

    I spent an hour trying to figure out what is happening. So far, my tests have shown that:
    - XULRunner works fine, so Internet Explorer is the culprit.
    - I created a similar structure of pages on the local file system and standalone Internet Explorer also has the problem: except that its asks with a floating bar whether to enable "Active X or script" content (we don't get those bars in embedded mode).
    - In standalone IE, I went to Tools>Internet Options>Advanced>Security and checked "Allow active content to run in files of My Computer" (and I had to restart the computer). This solved the problem in standalone IE.
    - The above setting did not solve our problem probably because embedded pages are loaded through a HTTP URL and not a local path.

    I am not sure why IE is suddenly that paranoid about security. The application is launched locally, so by nature it should have full rights. Then the files are all loaded from the same embedded webserver (no mixed URL as far as I can tell). I don't think there is any Active X in those 3 HTML editors, I believe only Javascript files.

    I have tried to tweak various security settings but I did not manage to make it work. And this was clearly working a few days ago, so a recent Internet Explorer update seems to have changed the expected behavior.

    A way to try the embedded setup in the standalone web server is to open the screen that is broken in your application, with those active system properties:
    -Dnativeswing.localhostAddress.debug.print=true
    -Dnativeswing.webserver.debug.printPort=true
    -Dnativeswing.webserver.debug.printRequests=true

    In the console, you should see lines like:
    Local host address: 127.0.0.1
    Web Server port: 49539
    Web Server GET: /class/2/chrriis.dj.nativeswing.swtimpl.components.JHTMLEditor/1/index.html -> 200 (OK)

    You then forge the URL to try in standalone IE (and keep your application running):
    http://127.0.0.1:49539/class/2/chrriis.dj.nativeswing.swtimpl.components.JHTMLEditor/1/index.html

    Please let me know if you investigate this problem further and have any more information.

    -Christopher

     
  • Armando Hilel

    Armando Hilel - 2013-11-19

    Hello Christopher,

    I found a temporary solution for the problem.
    For windows 7 users:
    1- Open "Control panel" and search for "updates"
    2- On the update windows search for "internet explorer 11"
    3- Right click and uninstall it.

    For Windows 8 and Windows 8.1
    http://windows.microsoft.com/en-us/internet-explorer/install-ie#ie=ie-11

    Please, let me know if/when you find a definitive solution.

    Att.
    Armando

     
    • Armando Hilel

      Armando Hilel - 2013-11-19

      JIT

      The CK editor seems to be missing from the classpath

      Oops, I added it, hopefully that works better.

      I believe you need to sign the jar

       
  • Christopher Deckers

    Thanks Armando,
    I had a bit more time and I made sure it all works now.

    -Christopher

     
  • Pete Brower

    Pete Brower - 2013-11-24

    I'm having the same issue with IE11. When you say you have it all working now, what do I need to do to get it working for me? Is there a new version of DJProject? I tried turning on the security flag for allow local content from My Computer. That did not help on my windows 7 install running CKEditor embedded.

     
    • Christopher Deckers

      Hi Pete,

      Sorry for the confusion: I have fixed the problem about the missing JAR in the demo.

      About IE 11, it is still a mistery. Maybe the culprit is Java/WebStart itself, if they do not grant the right permissions through the plugin in IE 11. But I am not sure how to find which component is the culprit. All I know is that I tried to tweak various security settings in IE 11 and did not manage to make it work...

      -Christopher

       
  • benchpresser

    benchpresser - 2013-11-29

    what if we upgrade to their latest versions?
    tinymce and ckeditor prodocuded latest versions for ie 11

     
    • Christopher Deckers

      Hi,

      I did not have time to try upgrading, but I don't think this will fix the problem. As far as I can tell, the problem happens when the page requests the Javascript files from the embedded web server and does not run them (probably considered untrusted).

      When I get the time, I will confirm whether upgrading fixes the issue. Apart from that, it would really help if I knew which security setting is blocking that Javascript execution.

      Cheers,
      -Christopher

       
  • benchpresser

    benchpresser - 2013-12-02

    temporaily we can bypass the webserver and load the html content from disk directly which contains the editor. it will make deploying a bit harder but i think it can work.

     
    Last edit: benchpresser 2013-12-02
    • Pete Brower

      Pete Brower - 2013-12-04

      How do you load CKEditor and run it directly from disk instead of via the web server? We have a software release headed into beta next week and this just came up. That sounds like it might help us get something going for our beta.

       
  • benchpresser

    benchpresser - 2013-12-04

    i have done that with javafx it worked. (javafx does not have websocket implementation as dj)
    i am currently trying that, will say the results.

     
  • benchpresser

    benchpresser - 2013-12-05

    yes i got it working with:
    dj latest, windows 7, ie 11
    i embed tinymce 3.4.9dev (tinymce says it works with ie11)
    i did not use CustomJHTMLEditor or etc.
    I created a new editor, it does not do any socket handling or webserver stuff etc.
    I load the editor content into the JWebBrowser by navigate command.
    I put the setData and getData into editor file.
    The problem is i have to deploy the tinycme folder and the editor content.
    And on runtime, the files must be present on client local disk i prefer user.home.
    Providing them through local webserver causes problems within IE11 as Christopher says.
    If the client installation does not allow local files, the editor can be installed on a apache webserver in intra local network.

     
    Last edit: benchpresser 2013-12-05
  • Christopher Deckers

    Hi Armando, Benchpresser,

    I am a bit silent (quite busy), but I am following your findings with interest.

    I looked at the articles, but it does not indicate any way to turn it off. If we could do that on the COM object, then we would solve the issue (maybe something for SWT to be done).

    I also read something about local connections being a problem, and that using "localhost" would help. The embedded web server uses the IP detection mechanism, which we can force to use certain IP addresses through DJ Native Swing system properties. I tried to use "localhost" before reading those articles but it did not work; I have to test that further to be sure (hopefully this coming week-end) also with an updated version of the editors.

    About the local disk access, how do you specify the path to the navigate command? As a "file://"? If the target computer is connected, the HTML editor could be located on a remote server too.

    Cheers,
    -Christopher

     
  • benchpresser

    benchpresser - 2013-12-06

    yes i use file protocol. not a very clever idea but it works now. yes a remote server can also be a option.
    i use both dj and javafx because we also have mac clients, and javafx does not have any webserver implementation and javafx inline editor does not work well.
    so i use the file access for both.

     
    Last edit: benchpresser 2013-12-06
  • Christopher Deckers

    Hi Pete, Benchpresser, Armando,

    I just uploaded "DJNativeSwing-SWT-1-0-3-20131207.zip".

    This preview contains a version of TinyMCE that seems to be compatible with IE 11 and DJ Native Swing to some extent.

    For posterity, here is how I spent that nice sunny day... Thank you IE.

    1. Looking for similar bugs

    I found this one, which I thought could be related.
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=422056

    Since it is not clear why some versions of TinyMCE do not work, I cannot rule out that some calls of TinyMCE are blocked for security reasons.

    1. I looked at the Enhanced Protected Mode (EPM)

    But, it seems to be off on my system. So this may not be the problem here?

    1. Internet Feature Controls

    I found this security related article:
    http://msdn.microsoft.com/en-us/library/ee330720%28v=vs.85%29.aspx

    I tried to tweak these properties, but no effect:
    FEATURE_CROSS_DOMAIN_REDIRECT_MITIGATION
    FEATURE_BLOCK_CROSS_PROTOCOL_FILE_NAVIGATION
    FEATURE_BLOCK_LMZ_OBJECT
    FEATURE_BLOCK_LMZ_SCRIPT
    FEATURE_IE6_DEFAULT_FRAME_NAVIGATION_BEHAVIOR
    FEATURE_LOCALMACHINE_LOCKDOWN
    FEATURE_LOAD_SHDOCLC_RESOURCES
    FEATURE_ZONE_ELEVATION

    • Current TinyMCE (3.4.3.2)

    I loaded the editor from disk: I created an "index.html" file with what I normally generate and unzipped the files from the TinyMCE zip. I then tried to load it in my HTML Editor internals with "file:" protocol.
    This did not work: the content remained blank (though XULRunner does show content).

    • Upgraded TinyMCE to latest (4.0.11).

    First, I changed the HTML Editor to use the new APIs.

    I tried the current code (which uses the embedded web server) but it did not work.

    I loaded the editor from disk. This worked, but saving did not work.
    This is expected because saving relies on a function that POST data. If I remember correctly, getting the content using JS functions had an issue when there was a long text so I implemented the POST mechanism. Keep that in mind if you implement a disk-based approach.

    • Upgraded TinyMCE to latest 3.x (3.5.10).

    I finally tried to upgrade to the latest 3.5 version. This worked, using the embedded web server.
    The only thing I had to do was to explicitely add the "searchreplace" plugin declaration in my example to get 2 missing icons.

    I also tested that code with XULRunner and on Ubuntu with WebKit and it is working as far I can tell.

    There is one rendering problem though. When the editor loads, I often do not have all the icons shown in the toolbar. If I click on another pane and come back, the icons show up.
    I tried all sorts of calls to re-load the toolbar through JS, to repaint the native component, etc. but I did not manage to fix the issue. I cannot tell for sure whether it is a bug in TinyMCE for IE or a timing issue in the various calls I use to initialize the editor.

    Maybe I should try the 4.0.11 again when I get time, because it would be weird that 3.5.10 works but not 4.x.
    Also note that I did not try to fix FCKEditor and CKEditor...

    Well, let me know your experience with that DJ Native Swing preview version if you get to try it.

    Cheers,
    -Christopher

     
  • michael

    michael - 2014-03-06

    Hi,

    are there any news on these problems?
    Has the new preview from Feb 2014 some fixes on these?

    cheers, michael

     
    • Christopher Deckers

      Hi Michael,

      The recent 1.0.3 preview is known to work with TinyMCE. But you have to make sure you upgrade to the libraries shipped in that version.

      Hope this helps,
      -Christopher

       
  • Chankey Pathak

    Chankey Pathak - 2014-03-27

    In IE11 you'll see a lot of issues with TinyMCE. If you upgrade to 3.5.10 then all the IE11 related issues will be done. The only thing which doesn't work in 3.5.10 with IE11 is the searchreplace plugin. It doesn't work at all, TinyMCE guys are asking to upgrade to 4.x to solve this issue, but I don't want to upgrade. Any idea how to solve searchreplace plugin issue with IE11?

     
    • Christopher Deckers

      Hi Chankey,

      If the searchreplace plugin is incompatible with IE11, then either you upgrade TinyMCE or you avoid using IE (install a XULRunner, etc.) or you remove that plugin. Unfortunately, I don't see any other solutions.

      Hope this helps,
      -Christopher

       
  • Pete Brower

    Pete Brower - 2015-11-04

    Well, we require CKEditor for our product. We can't take that away from all of our customers now. The workaround I used was to not use IE and offer them an option to run XULRunner instead. The problem now is that we are having a lot of focus issues. Like switching away from our Java application window to another desktop application then back. It looks like the focus is still in the CKEditor window but typing goes into the bit bucket. It's too bad Microsoft broke this for us. It was a very nice solution to WYSIWYG text editing in Java. I have found the threads on XULRunner / JWebBrowser focus issues and that the SWT folks need to fix that. So I'm screwed either way. Too much technology mixing I guess to be stable. Our current strategy is to move away from Java and into HTML5 for our application framework. CKEditor and everything else works much better there. We just aren't quite there yet. Maybe 6 month away. If anyone comes up with a workaround for either the IE11 issues or the XULRunner focus issues i would appreciate them posting it here to help us until we complete our move to HTML5. We have a lot of customers using our product globally and it's becoming a major issue for them.

     
    • Christopher Deckers

      Hi Pete,

      I know it is problematic and we seem stuck... I wonder whether the JavaFX WebView could be integrated in your Swing application to load the editors, it may work better focus-wise.

      Hope this helps,
      -Christopher

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks