TinyMCE bug - # symbol in link URL makes http://mce_host appear - tinymce

Have someone a resolution for that annoying problem?

Try this:
Open the file /sites/all/modules/tinymce/tinymce.module
Find the following function:
function tinymce_config($profile) {
...
}
Within that function, find the following line and remove it or comment it out:
$init['entity_encoding'] = 'raw';

Related

HTML2PDF : error (sometimes) when generating, but PDF generated

Let me explain !
I have a magento website. I'm generating custom PDF when my user is making an order.
It works most of the time, but for some reason, sometimes, I have this error :
Undefined property: Spipu\Html2Pdf\MyPdf::$h in ...../vendor/spipu/html2pdf/src/MyPdf.php on line 670"
The line is this :
public function getH()
{
return $this->h;
}
The class is : class MyPdf extends \TCPDF
and in TCPDF, $h is a protected variable
It's weird, knowing that my PDF is saved on my server, and I can open without getting an error..
Do you have any idea of what the problem could be ?
Ah ah got it !
Forgot to mention, i'm using a loop to make and attach my pdf to a mailer.
I had to put the declaration of the HTML2PDF inside the loop, not outside (that's make sense).
Hope this will help !

How to prevent VS Code from putting '{' on new line in C++ formatting?

If I write some code
void function() {
....
}
when I format the entire page using Shift+Alt+F, it becomes
void function()
{
....
}
How do I prevent that initial opening bracket from going to a new line?
Assuming you're using the MS C++ extension, these are the docs you're after. In > short, you'd need to either:
change C_Cpp.clang_format_fallbackStyle to one of: LLVM, Google, Chromium, > Mozilla, WebKit - and see if one matches your preferences.
find/make a custom .clang-format file
see clang-format docs for more details: > https://clang.llvm.org/docs/ClangFormatStyleOptions.html
https://www.reddit.com/r/vscode/comments/9rqj02/prevent_vscode_from_putting_c_curly_braces_on_new/

trying to access Thunderbird-tabmail does not work

I want to open a new tab with a gloda conversation from inside calendar code.
I receive an error from error console:
window not defined (or document not defined), depending on which of the two I use to Access tabmail:
let tabmail = window.document.getElementById("tabmail");
let tabmail = document.getElementById("tabmail");
The code works fine if the js file is included in an overlay xul-file.
But I want to use it outside of xul in my code.
Somewhere in my calendar code (in my 'addevent'), the same code throws the error.
This code is originally called from a rightclick on an email, but several layers deep into calendar code.
In MDN, I read that window is global? So what do I Need to do to add an tab?
This part works if tabmail is properly referenced:
tabmail.openTab("glodaList", {
collection: queryCollection,
message: aCollection.items[0],
title: tabTitle,
background: false
});
So how do I get a reference for tabmail?
Any help is appreciated.
after trying and looking through code for really some time before posting, it took only ca. 20 minutes to accidentally find the solution after submitting the question..
While browsing mailutils on mxr for something else, I found the solution in some function:
mail3PaneWindow = Services.wm.getMostRecentWindow("mail:3pane");
if (mail3PaneWindow) var tabmail = mail3PaneWindow.document.getElementById("tabmail");

Protractor + ionicPopup

Has anyone succeeded in using Protractor to detect an ionicPopup alert?
I've tried all the workarounds suggested here but no luck.
I need Protractor to detect the alert and check the text in the alert.
Here's the class I wrote to test that the popup exists and to ensure the text is correct in the header and body:
var TestUtilities = function(){
this.popup = element(by.css('.popup-container.popup-showing.active'));
//Tests to see if $ionicPopup.alert exists
this.popupShouldExist = function() {
expect(this.popup.isDisplayed()).toBeTruthy();
};
//Tests to see if $ionicPopup.alert contains the text provided in the argument exists in the header
this.popupContainsHeaderText = function (text) {
this.popupShouldExist();
expect(this.popup.element(by.css('.popup-head')).getText()).toMatch(text);
};
//Tests to see if $ionicPopup.alert contains the text provided in the argument exists in the body
this.popupContainsText = function (text) {
this.popupShouldExist();
expect(this.popup.element(by.css('.popup-body')).getText()).toMatch(text);
};
};
module.exports=TestUtilities;
Also check out this site for more on testing Ionic in protractor it talks about how to check to see if the popup exists: http://gonehybrid.com/how-to-write-automated-tests-for-your-ionic-app-part-3/
I've tested Ionic popups successfully by setting the popup variable as follows:
var popup = element(by.css('.popup-container.popup-showing.active'));
And in the test:
expect(popup.isDisplayed()).toBeTruthy();
Ionic Popups are just made of DOM elements, so you should be able to use normal locators to find/test them. Because they're not made of alerts, the workarounds in the issue you linked to are probably not useful.
I got it - I saw a lot of issues out there trying to do it in very complex ways, but in the end I tried this and it turns out to be this simple.
Inspect your element and find its ng-repeat value, then
var button = element(by.repeater('button in buttons')).getText()
You also need to have the browser sit out somehow for a couple seconds so it doesn't resolve to the tests while the ionic popup isn't actually there.
For that, browser.sleep(3000);
That's it! However, getting the other button in there is proving to be a little problem. var button = element(by.repeater('button in buttons')).get(0) or .get(1) return undefined is not a function.
Please accept the answer if you like it! If I figure out how to get the other button, I'll post it here.

A way in fiddler to replace a parameter before submiting the answer to the server

I tried to write in the CustomRules.js in OnBeforeResponse method:
if(oSession.PathAndQuery.StartsWith("/feed/predata/1-1-"))
{
oSession["PathAndQuery"] = oSession.PathAndQuery.Replace("false","1");
}
The full PathAndQuery looks like that
/feed/predata/1-1-false-2.dat
When i try to save the file I get an error sound without a messagebox to show me where the error is.
I also tried this code:
oSession.PathAndQuery = oSession.PathAndQuery.Replace("false","1");
What is the correct way to perform this action?
Thanks in advance,
Oz.
If you're trying to change the request, you need to put your code in the OnBeforeRequest method.
Also,
oSession["PathAndQuery"]
doesn't do anything you want it to. Use this instead:
oSession.PathAndQuery = oSession.PathAndQuery.Replace("false","1");