How can I do custom text selection in react native? - javascript

I just want to do a simple task here. Select some text and then do some manipulation on the selected text.
I have searched for over a day on custom selection in react native but couldn't find any solution for it. Any help would be appreciated.
I tried a package react-native-selectable-text. But GitHub repo for this package is archived and there is a issue in this package. And when I visited the issue list of the repo this issue wasn't entertained and there was not a single comment on that particular issue.

Related

How to implement the isotope-layout in next.js project?

I want to implement the isotope-layout in next.js project.
For that, I tried to do that with the following blog.
https://stackoverflow.com/questions/25135261/react-js-and-isotope-js
Also, here is the codesandbox link.
https://codesandbox.io/s/react-isotope-typescript-i9x5v?file=/src/App.tsx:1152-1504
That works for React project.
But when I try in next.js project, I can see the following error.
If anyone has a solution, please help me!
Thanks.
I too faced the same problem with Isotope and NextJS. At last I used https://github.com/ZitRos/react-xmasonry and got it worked. Store items in the state, Add your own filter buttons to update the state, and loop through the items inside XMasonary.
This demo page will give an idea
https://github.com/ZitRos/react-xmasonry/blob/master/docs/jsx/ContentChangesDemo.jsx

How to creat WYSWYG editor in react that also parses react elements or jsx?

I know it's a very generic question but I want to create one web/WYSWYG editor that enables user to put html tags as well as custom components(jsx), similar to what we see in code sandbox.
Any help would be appreciated just need a direction to go. Thanks
There are some libs that you can use.
10 Best React WYSIWYG Editor Libraries

When building an Atom Package, how do you show a list in a popup menu?

I'm building an Atom Package and I'm trying to show a list of items to the user. The user can search through those items and pick one. I'm trying to make something that looks like the menu below.
(source: github-camo.com)
This is sort-of like the Command Palette, except I want all items are from my package. I don't want to modify the Command Palette.
My package works basically like: You press Command+R, and this list-menu pops up with about 100 different options. The user then picks one of those options. I am not interested in the atom.commands.add API -- I'm not sure how to do this and I've looked hard at the API and searched online with no avail.
Any help would be appreciated.
The developers of Atom provide the atom-select-list Etch component for this purpose.
Example:
const SelectList = require('atom-select-list')
const usersSelectList = new SelectList({
items: ['Alice', 'Bob', 'Carol']
})
document.body.appendChild(usersSelectList.element)
Unfortunately, the documentation is scarce. I found it useful to take a look how others implemented it.

How to create pills input fields in react native?

I'm looking for a way to make "dynamic pills" like the ones below, but in React Native and Redux.
https://codepen.io/silkine/pen/pPxJOX
<div id="container"></div>
<div class="tim">this codepen is dedicated to
#twholman
</div>
1) Anyone know what they are called so it's easier to google tutorials?
2) I'm trying to convert the css with gulp and copy paste the JS into RN, but changing react syntax into RN. Getting a lot of errors. Is this a good path? Or do you know a simpler one? Maybe a tutorial somewhere?
Thanks!
It's called Badge.
You can use UI Kit like react-native-elements or you can check out code of this element in github repo. Use 'children' prop to pass TextInput.

editable picture and text in dashboard

I'm developing a dashboard that end-users can edit specific web page by uploading different picture and editing text in the page. The similar ideas is here.
I'd already done with web page design and I'm looking for suitable js library to make editable dashboard for end-users. Anyone has suggestions for that or if no current solution => how to implement these features? no idea about that ...
Very Thanks!
You can have a look on :
http://madebymany.github.io/sir-trevor-js/
http://innovastudio.com/content-builder.aspx
http://etchjs.com/
http://jakiestfu.github.io/Medium.js/docs/
http://createjs.org/
http://www.jqueryrain.com/demo/jquery-wysiwyg-editor/
and use the one(s) that most suit you. In case you did not find the one that completely suits to your project then you can make additions (such as adding modal windows or css styling) to hte one(s) which is more preferable.
Hope this was helpfull.

Categories

Resources