Searching for React components in VS Code - reactjs

Is there a way to search for content within* a component without knowing which component it is in? I'm working a new code base and I'm having a hard time identifying which components are which. If I could search for strings I see on the page ("Please click Here" for example) and get components/file results, it would make it easier to navigate the application. Is there a way to do that in VS Code?

You can do Edit, Find in files using Ctrl + Shift+f to search through text. Or You can click on search icon shown in the image below indicated as 1
There is an ellipsis on the dialog where you can include/exclude files, and other options in the search box for matching case/word and using Regex. Check below details.
2 - Indicates Refresh
3 - Collapse All
4 - Clear All
5 - Regular Expression
6 - Mention include/exclude files
7 - Match case/whole word
8 - Extend search functionality along with replacing functionality

Type shift-ctrl-F to bring up the global search. Click on the three horizontal dots (...) to bring up the rest of the dialog. In the "files to include" box, put the file type you want to include (e.g. *.jsx)

Related

How do i let a user insert a link in an input field with normal text?

I am using react.js
I'm trying to build a blog page.
there is a texterea tag to write a blog for the user.
now I want to add the function that allows users to add words that are linked.
so that when i show the text from that input words that are linked are clickable
enter image description here
like the blue words in wiki in the image above.
pardon my mistakes (1st question in StackOverflow)
I know about dangerouslysetinnerhtml. but not sure if it's the right way to do so. because then users can modify the code inside (i think). so what is the safe and right way to do so
Reading your case Markdown seems best option as it also supports links insertion. For rendering user entered markdown you may use library like React Markdown. For writing markdown textarea is fine as long as you write markdown syntax properly but you may want to consider libraries like React textarea markdown editor to make things easier.

How to access the search bar in a Firefox 57+ ("Quantum") web extension

I try to write my very first webextension, following this tutorial. I wrote a manifest.json and added a background script as I want to provide global functionality: I want to clear the search bar once the search was performed - basically it's this, but for Firefox 57+.
My question: How can I access the search bar at all?
I found a list of available APIs, including the tabs, the menus, and so on, but no search bar...
Currently it is not possible. You might want to file a bug for it: https://bugzilla.mozilla.org/
I filed a bug request as #Smile4ever suggested, which was declined yesterday. The extension team suggested to file a feature request for what "my" extension should have done, but from the perspective of this question: It is and will not be possible to access the search bar from an extension.
For sake of completeness, here is the URL of the bug (feature request) for FF in order to offer functionality (probably optionable) to clear contents of search bar after a search is performed: Bugzilla 253331
It appears that the search bar has been deliberately removed from Fire Fox Quantum and the address bar doubles as a search bar. So from now on use the address bar to type in your search. You will notice that when no web address is typed into the address bar. The address bar, By Default, has text in it that reads. SEARCH OR ENTER ADDRESS,

AngularJS - highlight text of an existing pdf file in frontend/Browser

I have found the library
PDF creation
With this library it is possible to create different styles of pdf documents.
My question would be if there is a possibility to mark text (and maybe add a link to this marked text) of an existing pdf file with AngularJS?
Or is there any workaround to do this?
The question is a bit too broad as is - not sure what you mean by "mark" - do you mean highlighted in some way or actually selected?
Anyhow, firstly to get to the correct page -- you can use fragment identifiers in hyperlinks to link to a specific page in a PDF via the page parameter. e.g.
page 1
page 2
If you want to highlight a specific section of a page, via a hyperlink, you can use the highlight parameter, note you must also set the page to use the highlight parameter. e.g.
page 1 - highlight
The rectangle values are integers in a coordinate system where 0,0 represents the top left, and the values are given in the order lt, rt, top, btm.
One can also open a PDF file to a "Named Destination", that is a named section in the document via the nameddest parameter. e.g.
my section
This is great as it doesn't matter if pages are inserted, removed etc as the section will always be correctly linked.
You can read about Named Destinations here and also the various Parameters for Opening PDF Files

How to specify path to a report from another report?

I have SSRS on SQL Server 2012 and using report builder to build a drillthrough report. I have a table 6 rows and multiple columns. Each text box has some number in it and I should be able to click on these numbers and go to a different report. Both these reports would be under same folder on report server.
Problem:
I am able to do it until this point by following instructions at this page.
My problem is I can't use a static link as each text box should direct to it's own unique report. And when I "Specify a report:" using "Browse" button there or by providing static link, same link will be used for all the text boxes in the same column. What I need is to be able to specify path to the report which is of format /Folder_Name/<valueOfColumn1><valueOfColumn2><nameOfColumn3>;
What I tried:
So I tried to use "Expression" by clicking on "fx" button and provided link as =Globals!ReportFolderFields!column1.ValueFields!column2.ValueFields!column3.Name
Outcome:
When I try using above methods by using expression it doesn't throw any error but the text box is not clickable (doesn't turn pointer into an index finger). When I used static link by using "Browse" button, the same text box was clickable and was taking me to another report.
What am I missing here? Any pointer would be helpful.
The syntax of the field list in your formula needs a few changes. It looks like what you're really trying to do is concatenate several fields together, with a slash at several spots, in order to get the proper URL format.
Let's assume that the following elements resolve to the strings you need. (It can sometimes be helpful to verify these resolve to what you're expecting by inserting textboxes for each, individually, in a section of the report for troubleshooting; you can always remove them later.)
Globals!ReportFolder
Fields!column1.Value
Fields!column2.Value
Fields!column3.Name
If you would like to concatenate these together to use as a URL, together with a few slashes added in the correct places, you'll need to follow the SSRS conventions on operators in expressions, which results in something like this:
"/" & Globals!ReportFolder & "/" & Fields!column1.Value & Fields!column2.Value & Fields!column3.Name
as always, since this is an expression, it will need to start with an equals sign.
The expression builder doesn't insert operators for you between fields - it's not that smart...

rtftextbox and hyperlinks/anchors inside document

A few hours ago I found that it's really easy to display *.rtf document using standart .net 2.0 winforms control (RichTextBox). It's really cool that it can display even pictures, but for me there's one missing feature - hyperlinking.
I prepared *.rtf document with a few hyperlinks to paragraphs inside document. Then I put this file into resources and loaded to rtf property of control but unluckly, clicking on links doesn't work.
Is there possible a hack or workaround to enable hyperlinks?
EDIT:
My customer will prepare one short document (let's say one *.docx file or one *.html file).
It will contain a few chapters and we want to place small table of contents at the top of document.
The expected behaviour is that user click topic and the control scroll its content to desired place in document.
So maybe it's not about links but about bookmarking.
OK, I'll try to describe larger part of needed solution.
My customer will prepare one short document (let's say one *.docx file or one *.html file).
It will contain a few chapters and we want to place small table of contents at the top of document.
The expected behaviour is that user click topic and the control scroll its content to desired place in document.
So maybe it's not about links but about bookmarking.
How are your links formatted and is DetectUrl true?
From codeproject -> only links starting with one of the recognized protocols (http:, file:, mailto:, ftp:, https:, gopher:, nntp:, prospero:, telnet:, news:, wais:, outlook:) are recognized and reformatted.
http://www.codeproject.com/KB/edit/RichTextBoxLinks.aspx
http://msdn.microsoft.com/en-us/library/system.windows.forms.richtextbox.detecturls(VS.80).aspx
The microsoft article has an example on the LinkClicked event.
private void Link_Clicked (object sender, System.Windows.Forms.LinkClickedEventArgs e)
{
System.Diagnostics.Process.Start(e.LinkText);
}

Resources