I was using tiny mce (version 3.2.6) for quite a long time (w/o any problems), but wanted to upgrade it to newer version (3.4.2). The reason of upgrade was some problems with third-party plugin (spellchecker) - after trying with newer version those problems were fixed and on developers env. everything was working ok.
The problem occured on live env (after delivering new version of app to client), on client side, you can connect to app (using tiny mce) in two ways:
(1) type address (so normal way, everything works ok)
(2) using some kind of portal - client app, that modifies urls for some reasons I don't know - using this way Tiny mce stopped working after upgrade to (3.4.2). (I've double checked and this is related only with tiny mce version update, not with plugins or other issues).
The way that clients portal converts urls looks like this:
non-converted url:
http://server.address/blabla/js/jsFileName.js?v=123
converted url (grabbed from fiddler):
https://client.portal.com/http://server.address/blabla/js/jsFileName.js?v=123&psScriptReferrer=http://server.address/blabla/
As I told before, the 'old' version (3.2.6) was working ok (even with those magically converted urls), problem occured after update tiny mce (no changes to configuration or anything else). The error I'm getting is:
q is not a constructor
https://client.portal.com/http://server.address/blabla/js/tiny_mce/tiny_mce.js?v=123&psScriptReferrer=http://server.address/blabla/
Line 1
(function(d){var a=/^\s*|\s*$/g,e,c="B...{a.selection.onSetContent.add(f)})}});
I get this eror on all browsers (checked on: IE6/IE8/FF3.6). This also results in tiny mce not loaded (only 'plain-html' text input is displayed).
My assumption is that new version included some regexps, and magically converted link contains more than one 'http' string.
I've tried some changes for the following parameters (setting them to 0) - no luck:
convert_urls : 1,
relative_urls : 1,
remove_script_host : 1
it is also one more 'promissing' parameter:
document_base_url : tinymce.documentBaseURL
but since this app should be working using two ways described above (1) and (2), I cannot just hardcode the link there (also this sounds like a very fragile solution).
I cannot 100% sure say that this is a bug in tinymce, because using 'normal' address everything works ok. On the other hand, I cannot do anything with those url conversion.
<script type="text/javascript">
tinyMCE.init({
mode : "exact",
elements : "content, contentFr",
theme : "advanced",
plugins : "spellchecker",
spellchecker_languages : "+English=en_CA,French=fr",
spellchecker_rpc_url : "jmyspell-spellchecker",
// Theme options
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,fontselect,fontsizeselect,|,forecolor,backcolor,sub,sup",
theme_advanced_buttons2 : "link,unlink,|,bullist,numlist,|,justifyleft,justifycenter,justifyright,justifyfull,|,code,|,spellchecker",
theme_advanced_buttons3 : "",
theme_advanced_buttons4 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
theme_advanced_resize_horizontal : 0,
theme_advanced_path: false,
content_css : "css/tinyMCE_custom.css",
oninit: function(){
tinyMCE.get('content').setContent('some text here');
tinyMCE.get('contentFr').setContent('some different text here');
}
});
</script>
Thanks for any help/hints.
Regards,
Peter
I would try upgrading to the current version of TinyMCE, which is 3.4.3.
In the changelog.txt file of that verion there is, among many other bugfixes,
"Fixed bug where exception was thrown in tinymce.util.URI when parsing a relative URI and no base_uri setting was provided."
I am not sure it will solve your problem, but it should be easier with an up-to-date version, because different issues are then less likely to interfere with each other.
Related
Look at my example at codepen :
https://codepen.io/jimver04/pen/gORdBwp
When I see in the console
put_char # selfie_segmentation_…_simd_wasm_bin.js:9
everything works well.
When I see
put_char #VM152 selfie_segmentation_…_simd_wasm_bin.js:9
or whatever #VM+number everything is stack.
How can I force to run selfie_segmentation_…_simd_wasm_bin.js without VM number ?
See also my issue posted in Mediapipe : https://github.com/google/mediapipe/issues/2590
About environment:
The used framework: SAPUI5
version: 1.38.39
development environment: sap web-ide
reproductible with OpenUI5 v.1.38
About Issue :
Recommendation from UI5 : to don't use console.log("message")
Proposition from UI5: use jQuery.sap.log.debug("message") instead, documentation here
expected result : see the "message" in the console from chrome debugger"
actual result : Don't see the "message" in the console"
Code part :
on my controller :
onInit: function(){
jQuery.sap.log.debug('onInit fired'); // display nothing in chrome console
console.log('onInit fired'); // display "onInit fired" in chrome console
},
Question:
Does someone has a solution or idea for solve this problem ?
Remark:
My question is probably simple, but i didn't find any solution
nowhere, and I am new to UI5, so I am asking here, thank you for your help and
comprehension.
If someone also can tell me why this question (the only one I asked so far) lock me to ask further questions, I think the post respect this ? Thank you for your feedback
Did you set the log level to DEBUG?
If not try to add :
jQuery.sap.log.setLevel(jQuery.sap.log.Level.DEBUG)
Also, is there any particular reason you are using 1.38 and not something more recent?
i have a simple webapp, with this piece of code :
$(document).on('drop', '#dropfile', function(e) {
e.preventDefault();
e.stopPropagation();
$(this).css('border', '6px #6BFF38 solid'); //vert
var file = e.originalEvent.dataTransfer.files[0];
alert(file.name);
return false;
});
The "alert(file.name)" return just the name of the file. I know it's a usual question, but i didn't find the answer. How can i get the full path of the file instead of only the name ? Is there any parameter of the file to get it ?
Answer by : Alexander Zinchenko
Link : Get URL of resource that is drag-and-dropped on field
In Firefox you can use file.mozFullPath. However, this variable presents only in Firefox and don't work in Chrome or Safari.
Addendum :
Due to security reasons, a files path information is never exposed. Even mozFullPath does not return the full path of file.
From mozilla website description for mozFullPath : This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future
I've implemented this UX for ExtJs 4 (it generates an Excel file from an ExtJs 4 grid or store)
http://druckit.wordpress.com/2013/10/26/generate-an-excel-file-from-an-ext-js-4-grid/#comment-982
and it works perfectly in Chrome, however I keep getting this error " the data area passed to a system call is too small" in any version of IE
Here is the fragment of code that seems to be the problem, the full code is in the link above.
var el = Ext.DomHelper.append(gridEl, {
tag: "a",
download: title + "-" + Ext.Date.format(new Date(), 'Y-m-d Hi') + '.xls',
//download: 'descarga.xls',
href: location
});
el.click(); //this line seems to be causing the error
Ext.fly(el).destroy();
}
I know there is downlodify and other options (like server side generating) but they are not an option at this point for me.
Is there any chance I can make this UX work in IE?
Can anyone point me in the right direction ?
Thank you.
Using the listed method will not work well with IE because IE has a limit of 2083 characters. If you debug the code in this fiddle https://fiddle.sencha.com/#fiddle/17j you'll notice that the location variable is well over 5000 characters and also fails in IE. I'm assuming the issue is the same if you debug your code as well.
I set my embedded bespin as below, which works good:
_editorComponent = new bespin.editor.Component('editor', {
language : my_language,
loadfromdiv : true,
set : {
fontsize : 10,
tabsize : 4,
highlightline : 'on'
}
});
and html part for this:
<div id='editor'>some code...</div>
By following embedded bespin's code, i was able to find out getContent and setContent, however i couldnt find anything on Bespin documentation for further implementations of Bespin.
Is there anyone who knows how to add search and replace functionality to it? for example from above instance:
_editorComponent.searchText("some_string");
_editorComponent.replaceText("some_string","another_string");
_editorComponent.focusText("some_string");
Do we have such commands on bespin, which i can use on my application?
Edit: Response to same question on google groups:
There was some support for
search once upon a time in Bespin, but
it's not back to the rebooted Bespin
yet. But it's definitely one of the
features on my to-be-implemented list
;)
So this can only be done with workarounds for now, any workaround is more than welcome.
Edit: response to same question on google groups:
There was some support for search once upon a time in Bespin, but it's
not back to the rebooted Bespin yet. But it's definitely one of the
features on my to-be-implemented list ;)