How to get selected text from google doc embedded in angular - google-docs

We are developing software in angular for Cloud File Manager, We are using google drive as a backend. We have the following task that needs to perform :
When the user search for any string in folder/file listing, files, and folder that contain that string will be listed. and when the user will open any file (Google Doc/ Google Sheet or Google Slide /PDF) our angular application should highlight the searched text in the file.
When the user selects the text in the file view, we will enable a virtual copy content button. so that we can track the word count that is copied by the user and we need to limit the user to copy the content let's say 500 words per day. when a user reaches to limit, the user can't copy the content.
When the user copies any content from view and pastes it to any other word document (MS Word or Libre Office), the formatting of the content should be the same. Ex. if the user is copied table, the user can paste it as a table in the word.
Techstack: Angular, Node and Google Drive v3 API
Do you have any solution or any other way to perform the same thing?
Solution Tried:
We have tried to download the files at the server end and display them on the angular end. Highlighting the search and Copy Content Limit is working fine but the Formating of the content does not remain the same when we are pasting it to local MS word. (We have used the mammoth viewer)
We have converted the doc into HTML and tried to display the document. but it is possible as embedded iframe feature and We are not able to get the selected text for copy and we are not able to highlight the searched text as well.
We have tried to integrate the google viewer, we can directly display the google doc to viewer but it is also creating the embeded iframe tag and still facing the seacted text and searched hightlight text issues.

Related

Powerapps: Use a button to upload a file to a specific folder in Sharepoint

I've made a powerapp that writes information to an excel spreadsheet but I also want to add a button to the app that will prompt the user to upload pictures or documents to a PARTICULAR FOLDER ON SHAREPOINT. Any ideas?
One solution could be to have the button in Power Apps to take users to the SharePoint Folder.
The code in the OnSelect property of the button would then be:
Launch("htts://youtenant.sharepoint.com/sites/yoursite/yourlibrary/yourfolder")
And if the library or folder need to be different from, you can use paramenters for it e.g.
Launch("htts://youtenant.sharepoint.com/sites/yoursite/" & varLibrary & "/" & varFolder)

Selenium python webscraper - How to select only the first document in a webpage list that changes?

So, I have most of this webscraper written, but the one thing I don't know how to do is select the top/first pdf document in a list of documents from this website https://tofino.civicweb.net/filepro/documents/855?expanded=100967. New pdfs are supposed to be added to the top of the respective year's folder monthly. Normally I would select the document by xpath and download it that way, but I don't know if this will work in this situation. Does the question make sense?
To select the first PDF just use:
driver.FindElementsByClassName("document-link")[0].click()
If you want to now download that, try:
driver.FindElementById("ClicktoDownLoadnotice").click()
ClicktoDownLoadnotice is the id of the PDF preview button
Finally, download the PDF:
driver.FindElementById("maskedImage").click()
"maskedImage" is the ID of the download button if you are on Chrome

Microsoft Word Macro Button to Save/Export Legacy Form Data to Excel Spreadsheet

First time poster here. This is my question:
STATUS. I built a word template for my company to automates the construction of our agreements. It has a legacy form on the first page that pulls clauses/verbiage into the rest of the document using conditional statements that reference the bookmarks in the form.
PROBLEM. I would like to create a submit button at the end of the form that, when pressed by the user, automatically exports the user’s responses to the form to one excel worksheet that houses all user responses to the form.
PRIOR ACTIONS. I cannot use an excel macro to search the folder where the word documents are saved because the users save each instance of the template agreement in different project folders. Additionally, it is impracticable for the form data to be sent to me via email.
Any help is greatly appreciated! If this question has been previously posted, please send me the link.

Open documents with office 365 in SharePoint Online

I have a display template called "Item four lines" based on the out of the box "Item two lines" template which I modified to shown 4 lines rather than 2.
My documents are coming up correctly to match my search query, however when I click on the documents returned by the search results instead of these opening in the browser (Word Online, Excel Online, PowerPoint Online, etc) I get propmpted to save the documents locally. The ideal behaviour here will need to be the same as clicking on a document from a document library where the documents are opened automatically by Word Online, Excel Online, PowerPoint Online, etc in the broweser.
Is there anything that I need to add or do to the display template to achieve this?
Any help will be greatly appreactiated

Custom viewing of files from Documents and Media portlet

I have a requirement where in a drop-down with years (2008,2009,2010,2011,2012) as its values is to be displayed.
On select of a particular value all annual report (i.e all pdf files falling in that year) for that particular year are to be displayed.
I have found Documents & Media useful to store such files. I have created Document Type for annual report having following meta data:
NAME: Text field-name of the file uploaded
FILE UPLOAD: file uploaded
YEAR: Integer-this year are linked to the drop down values
I am trying a way to filter (displaying all years in drop down) be added on viewer.
When you select a year, the file document stored is displayed. Please help as how to go on further.
We have Documents & Media Display but it shows all the files
Or if Web-content Display can be useful?
Or if how Documents & Media Display can be modified to generate a drop-down of all values displaying links to the pdf?
Please help.
So here is your requirement in short:
Show a drop-down with certain values
On select of any of the values, a list should appear which displays the list of files.
So here are my suggestions according to the points above:
Create your own custom portlet to show the drop-down. Don't go with customizing the liferay's portlet since later on you might get some more requirement to refine the logic or change the UI and you may also be required that Liferay's Document library portlet works as is. But if you want that uploading the files and a drop-down should be given in the same portlet then you have just one option to go with the Documents and Media display portlet.
Write your custom logic to display the list of files using Liferay Document & Media API in conjunction with Dynamic Query API.
The challenge would be to make the logic of fetching files according to the Meta-types for your Document Type, since I don't think liferay does not provide any way to fetch data according to the Meta-data types in a Document Type.
Please comment if you need something more or have not understood anything.

Resources