CKEditor not running locally on Windows

I am trying to run a copy of CkEditor on the desktop (not a server) under HTMLViewer. It runs fine on macOS (Safari, Chrome, FireFox and Opera) and Windows (FireFox and Chrome), but refuses to load with either IE or Edge on Windows. I have turned all restrictions to Low in Windows and checked all the preferences, but cannot get it to view the JavaScript editor locally — it shows as a blank white HTMLViewer.

I have enclosed a link to a version below. You need to run the index.html file inside the Samples folder.

Download here

Under Chrome it looks like this, where the ‘Hello World’ field is editable:

I need it to run on IE so I have use the MBS plugins to extract data from its main field. With a WebKit HTMLViewer I can view/edit the JavaScript, but not extract the data. With a Native HTMLViewer I can (hopefully) extract the data, but cannot view the JavaScript. Thus I am in a bind.

I want to run CkEditor locally so that users can edit their HTML even when away from the internet.

Any clues on how to get it running in a Native HTMLViewer for Windows?

CKEditor is a rather complex piece of software that may bump into IE very real limitations. There are hundreds of HTML5 stuff that IE does not support.

To edit HTML, why not use a plain instead ? Do you really need styling, fonts and justification ?

Michel, I am using it as a pseudo-editor of which I can easily save the results into a database, place any file/picture assets online, view on-screen and convert to plaintext/PDF if needed. It has a huge number of free plugins that I don’t need to write or maintain. You can also increase or reduce the available on-screen buttons and features in the initial HTML file or by sending it JavaScripts. It is much more flexible than plain text, RTF or Word.

I have successfully managed to send the HTML from CKEditor to a second hidden textarea, to get over the character limits of document.title. I am now trying to extract this second textarea using either webkit or IE, so far without success!

It is works, I will be able to use CKEditor cross-platform (macOS and partial Windows so far) in desktop and web apps.

Just to be sure… you are aware that I already wrote and maintain an addon for this, right?

Tim, if you mean ‘gHTML Editor’ then yes, I already bought it and love it! I will use it for web-based apps, but I found I could download and run CKEditor locally as well — so it will be available off-line.

BTW, my Microsoft Store rep just told be that the HTMLViewer technology is very likely to be using the IE Engine and not the Edge Engine. Also that the IE Engine cannot run local apps like CKEditor. So it looks like webkit is my only solution. I need to extract the full text from my hidden text area.

HTML Edit runs offline on both the Desktop and Web. HTML Edit was designed to have no remote online dependencies.

It is possible to set the IE version of HTML Viewer with registry keys:

Edit: It took me a long time to find, but no ‘gHTML Editor’ is not mine. CKEditor does have licensing requirements (fees) if you plan to use it commercially. HTML Edit uses the engine which does not.

Yes, HTML Edit looks really good too and solves the desktop Windows issues. I’m a long way embedded into CKEditor, but will have another look. Thanks for the other info.

I tried using CKEditor with the meta tag from the blog and it was still unable to display the editor with IE or Edge.

Strangely enough, shows a splendid editor in IE and Edge.

There may be something else.

Have you got in touch with them ? They have a Support menu item.

If anyone knows, it is the CKEditor developer.

Michel, I agree, that’s why I was wondering if it was a local Windows permissions issue.

First, the download link you posted probably does not have the latest version, which is Version 4.6.2 • 12 Jan 2017.

Second, asking here is kind of futile. Chances are the people at will give you an instant reply.

Michel, I downloaded the custom CKEditor build today, so it should be up to date!

I’ll check with the CKEditor support as you say. I can get CKEditor working with webkit which it what I am favouring. I now only need to retrieve the contents of a webkit textarea which should be entirely within Xojo, but is proving elusive!

I don’t think trying to extract text from the source is the proper way to go. CKEditor stores the text with tags. CKEditor provides JavaScript methods to extract pure HTML

There are two ways you can go about getting the source :

  • Use JavaScript to create an invisible TextArea that contains the non styled text. Then use MBS to get the source, and you will have pure text
  • Use JavaScript to return the pure text content in chunks

[quote=322567:@Michel Bujardet]

  • Use JavaScript to create an invisible TextArea that contains the non styled text. Then use MBS to get the source, and you will have pure text[/quote]
    That’s what the goal was. He ran into the <title> limit and started trying this idea.
    The fragmented threads make it hard to follow along. Jump in here:

Indeed, it is always difficult to follow when two threads are started about the same thing.

His idea can work, but not directly from CKEditor work area, which is not in clear text. He will have to use a CKEditor method to put the text within an invisible textArea or div, so MBS can pick it up. It is not difficult to do.

On macOS I use the built-in JavaScript method from CKEditor to pass me the HTML exactly as I need. I can’t do this on Windows since I cannot both run CKEditor AND return the result from a JavaScript. I got the document.title method working, but it has limited capacity. I might be able to run the JavaScript and place the result into a secondary textarea.Value , but now I have a problem on how to get Xojo to read the textarea.Value. I have tried reading the whole Source of the HTMLViewer, but it doesn’t contain the contents of a textarea.

Ay caramba!

Are you meaning to bring the whole text back using multiple document.title=… calls?

Yup, that seems to be the only way we will be able to get data out of a HTML Viewer cross platform in the near future.

That is the only way to overcome the 4k limit.

If your document is text, it probably contains line endings characters. A JavaScript split on
can probably do just fine, to send paragraphs one after the other, with some tagging and the number of the array element.

The exact limit is 4096 characters for the title change event.

I have now solved my original issue by using a webkit HTMLViewer on Windows pointing to a copy of CKEditor locally and extracting the HTML via a ChromiumFrameMBS.

Thank you to all involved!