I'm writing an Excel add-in using Office.js that contains custom functions and would like to know if there is a way to prevent the Developer Window from opening when I call a custom function.
The blank 'functions.html' page from manifest.xml <bt:Url id="Functions.Page.Url" DefaultValue="https://localhost:3000/functions.html" /> opens whenever I call the function for the first time after loading the add-in.
Using Excel for Mac (16.32).
Please execute the following command on your Mac machine:
defaults write com.microsoft.Excel OfficeWebAddinDeveloperExtras -bool false
You can find more information about it at:
https://learn.microsoft.com/en-us/office/dev/add-ins/testing/debug-office-add-ins-on-ipad-and-mac
Please let us know how that works.
Thanks,
Zlatko
After looking into this issue a bit more, I discovered that the sample you have cloned is not good - it cannot work on Mac or Online, where the Javascript runtime is a browser, in which case the Page resource is used, instead of the Script resource. To work, the HTML file must include the JS file, but it doesn't. I am sorry about that.
I will ask the owner of this sample to fix it.
Meanwhile, you can try to manually add this line to the functions.html file:
<script src="functions.js" type="text/javascript"></script>
Or, you can clone this manifest. Since all of its resources are publicly available, all you need to get started is just the manifest. It doesn't require any tools or packages either.
Let us know how that works for you.
Thanks,
Zlatko
Related
I'm planning on trying to see if it's possible to make a website in Godot(Yes, I know I shouldn't I just want to try just to try). I thinking about and looking over the features I need and I have one problem.
I just need a way for a person to press a button and get redirected to my itch games. I don't care if it creates a new tab or changes the current tab. Thank you for any help.
If you dont export to web you can call
OS.shell_open("url")
Sadly this does not work in an html export. A solution I found for myself is the JavaScript Interface. As the name suggested it allows you to execute Javascript.
So to open a URL you could connect the pressed signal of a button to something like this:
if OS.has_feature('JavaScript'):
JavaScript.eval("""
window.open('https://google.com', '_blank').focus();
""")
This will open a new tab in the active browser.
I also found an article on the godot site, basically asking the same question (https://godotengine.org/qa/46978/how-do-i-open-richtextlabel-bbcode-links-in-an-html5-export). Here they tried to use an RichTextLabel with BBCode.
The solution did not work for me, when I tested it, though.
As pointed in the comments you can try OS.shell_open, for example:
OS.shell_open("https://example.com")
That only works if it is not an HTML export.
Your other alternative is to eval JavaScript, for example this navigates the current tab:
JavaScript.eval("window.location.href='https://example.com'")
Which only works if it is an HTML export.
Since that only works for an HTML export and the other does not work on an HTML export... If you need both you can do this:
if OS.get_name() == "HTML5":
JavaScript.eval("window.location.href='https://example.com'")
else:
OS.shell_open("https://example.com")
See also Close a game in Godot.
guys
I'm building the web based code editor for my personal project.I want to make it work like VS code but facing some issues.
I'm using ACE editor.
This is what I get while trying with autocompletion.
I'm getting all the available suggestions while trying to write "os.(something)", rather then just getting the language and package specific suggestions.
What I want is this.
In this pic as you can see I'm getting suggetion related to os package only.
Depending on your setup with require-js, you may also need to include an additional javascript file in the html for your page. You need to write this simple script to working with the auto completion feature.
ace.require("ace/ext/language_tools");
var editor = ace.edit("editor");
editor.setOptions({
enableBasicAutocompletion: true
});
Demo: https://github.com/ajaxorg/ace/blob/master/demo/autocompletion.html
Reference: https://github.com/ajaxorg/ace/wiki/How-to-enable-Autocomplete-in-the-Ace-editor
HTML, JS, CSS Based
Create <textarea onkeyup=compile() id=code>. It should be big enaugt for code.
Create <script> </script>
Build the autocomplete
Script: function compile() { document.GetElementById('code').value = document.GetElementById('code').value.replaceAll('snippet1', 'Snippet1Value').replaceAll('snippet2', 'SnippetValue'). ...
E.g.: When you enter _text_ (and you set snippet1 to <input type=text>) then your textarea will write <input type=text>. To create an picker, use a contextmenu-library at json.
I know, this is only an plan how to do is.
So, I have modified the header.tpl file in OpenCart 2.0.3.1 by removing the wishlist, linking the telephone# as a click to call and added a custom class called "great-barbecue". It worked in one version that I earlier installed. When that whole thing went sideways, I started from scratch and now the wishlist still shows up, the phone# and icon are not "click to call" and my custom class is not appearing at all? Here is a link to the code I have for header.tpl in catalog/view/theme/default/template/common header template
My site chestersbbq.com/Groton
When I copy and paste the code I get an error telling me to indent all code with 4 spaces and I really don't have time for that, hence the link. I have tried it in all browsers and when I look at the source code for the page the wishlist is still there, the phone still links to contact and my custom html is not there. I don't know how to fix this.
nice site, I have found this in the open cart forums, it looks like you have to remove all instances of the wish list. Try this and let me know how it goes.
http://forum.opencart.com/viewtopic.php?t=32955
I have been working with Vaadin charts during this week and I found a problem that I cannot solve. I need to send several charts to a PDF generation (using iTextpdf) and I could do it using SVGGenerator. The main problem is I cannot use this solution because the final laptop doesn't allow any installation, and Phantomjs is required for SVG Generator (no add-on can be installed neither). I tried to find a different solution to convert the chart content into file or buffer that I can manage, but I think I have been reading so much posts and I am not able to distinguish the solution.
So, I will try to clarify basic questions first:
a) Is it possible to manage SVG Generator without any installation in the laptop?
b) If not, is there a different way to convert a chart into an object which class could be managed to insert it into a PDF?
I can assure you I tried to read all documentation in this forum and official Vaadin forum related to this topic but I couldn't find any solution. I don't want to seem lazy, I only want to avoid spending more time and clarify the maining pre-conditions to solve this issue.
thanks in advance for your time and help.
Kind regards,
David.
You can take a screenshot of your chart and append it to pdf:
Screenshot screenshot = new Screenshot();
screenshot.setTargetComponent(myTargetComponent);
myChartLayout.addComponent(screenshot);
//when complete
screenshot.addScreenshotListener(new ScreenshotListener() {
public void screenshotComplete(ScreenshotImage image) {
//do something
}
});
//take screenshot
screenshot.takeScreenshot();
You will not be able to render a Vaadin Chart without a web browser engine of some kind. That's what PhantomJS provides. If you have a full-blown web browser at your disposal, though, you can grab the SVG markup manually from there; it's just a bit more difficult to automate. This works in Chrome:
Open your Charts app in the browser
Open the JavaScript console (Ctrl/Cmd + Shift + J)
Type something like this: copy(document.getElementsByTagName('svg')[0].outerHTML)
Paste the contents of your clipboard to a new text file and save it as an SVG.
You don't need to install phantomjs, just bundle its binary along with your web application (Reference). I did the same thing with my Amazon AWS deployment and it works just fine.
I have a report that contains a link to a Word document. I have created an Action on the textbox that is Jump to URL, with the URL populated.
I have a PerformancePoint dashboard displaying the report, which is in a report library using SharePoint Integrated reports.
The link is not working correctly. Following the recommendations of this guy I surrounded my link w/ the javascript to open in a new window.
This works everywhere except for the end result. The link works from BIDS, Dashboard Designer, and the Report Library. It does not work from within the dashboard deployed to the SharePoint site. Any ideas?
Edit:
This HTML link:
=First(Fields!Link.Value, "MyUrl")
gives me this in the rendered report:
<TD style="WIDTH:53.98mm;word-wrap:break-word;HEIGHT:6.35mm;" class="a7">Click Me!</TD>
This Javascript link:
="javascript:window.location.href='" & First(Fields!Link.Value, "MyUrl") & "';"
gives me this in the rendered report:
<a tabindex="40" href="javascript:window.location.href='http://example.com/sites/some/subsite/DocumentLibrary/Folder/MyDocument.doc';" style="color:Blue" TARGET="_top">Click Me!</a>
Which does nothing when you click it.
I'm not familiar with Performancepoint, but the way you write the javascript seems like you simplified it a bit? I'm asking because the only way that perfectly fine link would not work would be if the page has a return false for the links in it. Try moving the whole changing the URL into a function, like:
<script type='text/javascript'>
function goTo(url) {
window.event.stopPropagation(); // cancelBubble() in IE
location.href = url;
return false;
}
</script>
with the link being:
="javascript:goTo('" & First(Fields!Link.Value, "MyUrl") & "')"
and do some trial and error inside the goTo function, sorry not being able to help you more precisely. Try also testing in a second browser (if you are not already) to see if this is some browser-specific behavior.
It turns out that there were two issues going on.
My first attempt at rendering a link using https://example.com/... didn't work because Reporting Services 2005 refuses to link to https web sites. (no source for this info, just determined through experimentation)
My second attempt at putting javascript around the link failed because PerformancePoint 2007 dashboards don't execute JavaScript from a report. (no source for this info, just determined through experimentation)
The solution was to go back to a straight HTML solution, and use http. This gets redirected to https and the document loads. This solution may not work if your environment does not automatically redirect http --> https.
I didn't mention the https in my original question because I didn't realize that would make a difference.