Take the 2-minute tour ×

as the question states, I wish to embed a tinymce editor in a PyQT webkit component.

As far as I understand, evaluateJavascript allows for js functions to be called.

However, when I try loading tinymce.min.js, the editor does not display anything at all. As suspected, when evaluating a javascript that 'loads' other javascript files, they don't actually get loaded.

At this point, I feel lost. I will try to manually load 'plugins' that will be specified in tinymce's init function and will update this.

Till that time, any help would be really appreciated.

share|improve this question
what have you tried so far (show us some code)? –  Thariama Jun 17 '13 at 7:24

1 Answer 1

EvaluateJavaScript does make javascript function calls, or embed a whole javascript file. The following details out the attempts to solve the problem:

  • The approach of first reading the tinyMCE.js file and then using that in an evaluatejavascript method embeds the javascript somewhere, and can't be sniffed out in a webkit console. When loading files using the evaluatejavascript method, any dependencies, such as the ones that tinymce require, are not loaded. I think it's because javascript calls are "attached" to the webkit but not embedded in the frame's DOM itself.

  • The second approach consists of creating a webkit page and loading an html file. The html file itself embeds the javascript, so the component works like a "browser". In tinymce's configuration, toolbars and unnecessary parts were hidden. TinyMCE version 3 worked well with PyQt4. When the 4th version was embedded in an html page however, textareas were not being converted to tinymce editors. The console itself shows 'undefined' error messages, deduced to the assumption that tinymce 4 uses different javascript syntax and a different compiler.

And so ends my quest to write a stand-alone webkit editor. :)

share|improve this answer

Your Answer


