I know how to subscribe to selection change events in the office Word API for my addin (see e.g. https://learn.microsoft.com/en-us/office/dev/add-ins/develop/read-and-write-data-to-the-active-selection-in-a-document-or-spreadsheet or Microsoft Word JavaScript API - event handler for text selection in document), but I cannot figure out how to subscribe to scroll events i.e. where the cursor is not moved. Do you know how?
Scroll events are not yet supported in the Office JavaScript library. But it is a good idea. Please suggest it at Office Developer Suggestion Box.
Related
I want an spfx made webpart that I've made be able to send an email (I'm using IEmailProperties at the moment) which provides a link to a modal form?
For example:
User clicks button in webpart, form loads.
User fills out form and submits it to SP list.
Form sends email on submission. Email has a link to the actual item created, so when the user clicks the provided email link, it opens up the modal form.
I would presume that the user would HAVE to be sent to the SP page where the webpart is unconditionally, but would it be possible to open up the modal corresponding to the SP list item?
Is this feature available in SharePoint framework, because if it isn't, compared to something like InfoPath 2013 or PowerApps it's quite a limitation.
I've researched this with several shallow Google searches and on gitHub for any premade stuff, but alas there is nothing that I've spotted.
I've been told IT IS possible:
"Yeah, they’d have to visit the page. Email clients don’t do JavaScript so you can’t really do interactive stuff there. If you want to take them directly to a page that then displays a modal, that’s plenty possible though. (e.g. display the modal based on if the URL contains a certain string)"
But wouldn't know how to do the above, can anyone start me on the right path?
Regards,
T
In the email, pass a query string containing the item ID/list ID etc of the item, then have the webpart read the See: How can I get query string values in JavaScript? If your values exist. If they do exist, then open the modal using some kind of framework like bootstrap or fluent UI. You can write your own form using PnPjs or use an iframe potentially to display the OOTB edit form.
Additionally, you can link to any page in SharePoint provided you use an extension instead of a webpart to host the modal. You can install extensions tenant wide, and have it listen for the query string.
I'm developing a Word Add-in (Word API + Office.js) and I'm wondering if it's possible to get notified when the user click on Close button of word application
Currently my word template has few content controls with data, i am saving the content control data to database when the cursor comes out of the control.
i am trying to implement the same logic when the user click on Close button.
so want check whether Word API has a way to track user click on Close button? Thanks!
I'm afraid that there is no way yet to handle that event in Office.js. But it's a great idea. Please go to Office Developer Suggestion Box and vote up this suggestion.
I want to create a simple form in Slack that contains :
text boxes, radio button selections, checkboxes and list selection boxes.
I want that the form will interact and open a ticket in Jira from Slack.
I herd it's possible but I don't know how to do it.
Please help,
thank you very much.
This is only partly possible with Slack. You can do something called a Dialog in Slack, which is a kind of modal form. But it currently only supports three types of input fields:
input
inputarea
select
No radio buttons or check-boxes.
Check out the excellent official documentation for details.
I'm not sure if it's possible to do what I'm hoping, but maybe I'll get lucky. It has to do with setting form fields in a SharePoint 2010 list, using InfoPath forms.
Basically, I have one list with requests from several vendors. Each vendors has their own requests page which is a Web Part Page with one web part: a list of submissions with a custom view applied that filters it only to them. This is a (clunky but functional) way to ensure each vendor only sees their own requests. To submit a new request, they click on the "Add Item" link at the bottom of the list web part. At this point, a customized InfoPath form pops up, and they add their request.
In the form, one of the fields is "Vendor". What I would like to achieve is to have the InfoPath form read something on the page which tells it which vendor's page it was called from and pre-select that vendor (I could then disable the control so they couldn't change it). I am happy to alter the calling page as needed, or to configure the InfoPath form (can you custom-configure GET or POST values or anything to define a field that way?).
Any help would be very appreciated.
I've created a webpage in Crafter CMS (version 2.5.2) whose purpose is to help edit a Crafter Component. I'm doing this in my page instead of in the CStudio Panel because I want to search/filter for specific components (I have 1000s). I'm editing the components using Crafter's In Context Editing capabilities, but I want to be able to call actions such as Create New, Delete, Approve & Publish, History, etc on a selected component. Is there any way I can do that from my web page along with the UI (e.g. Create New pops up normal Create New modal dialog, History pops up history dialog, etc.).
Crafter CMS uses a message pump between the preview pane and the studio application to inform the application of actions taken "in-context." within the preview pane. Messages (operations with metadata) are pumped by the system automatically between the two contexts (the studio application and the preview pane.)
"Edit" is currently a valid message/op.
"Delete" is currently a valid message/op.
However in 2.5.2 there is no "New" message/op.
In order to fire a New Op message you would need to register the message and build the handler (all Javascript) that fires the appropriate javascript APIs for the app. To fire a New operation you only NEED a path to where the content will be created in the message as metadata. The App already has code to look up permissions and check if which content types are available at that path.
Javascript files of interest:
Fire the message
/static-assets/components/scripts/guest.js
Handle the message
/static-assets/components/scripts/host.js
Declare the valid messages
/static-assets/components/scripts/crafter.js