React Native - Is there any possible way to embed elements within the text of a text input? - reactjs

I would like to allow the users to type raw text into an input, but also allow them to embed special kinds of content within the raw text.
For example:
My hope would be that the element would be handled by React Native as essentially just an extra big text character, so that it could be multi-selected, backspaced, etc.
If this is not supported by default in React Native, would it even be possible to implement this functionality on my own? Or is this type of feature not even supported on the native (Android/iOS) environments?

Related

tinymce wysiwyg editor - text cursor issue, text fields/areas become inactive

I'm working on a couple of features for a project that I created a few months back when I was first learning React. I wanted to add a wysiwyg editor to one of my forms so that a user could have more control with the "about" section of an event page (i.e. embed media and images, html source code editing, font formatting, etc.)
The editor that I'm using is TinyMCE 5.0.
This project is a Rails backend and React frontend. (I'm not using Redux - this project was a way to practice React when I first learning it.)
You can find my last commit here if you would like to see my code
The Problem
I'm able to get the wysiwyg editor rendered. I can also type and format text inside the editor's body. When I click on the code icon or image embed icon (like in the gif below), a new modal appears but when I click into it to type, the text cursor appears and then disappears. So I can't type and it seems that the text area and fields become inactive (for lack of a better term - I'm still somewhat in the beginning of my coding journey.)
I just signed up and TinyMCE gives access to premium plugins as well, so I don't think it's an issue with my account permissions/subscription.
I'm also not receiving anything in the console but if there's any help you can provide, it would be appreciated!
Thanks!
TinyMCE 5 editor - text cursor issue - text areas become inactice
It is highly likely that the library you are using for your modal (that contains TinyMCE) is not allowing focus to go elsewhere. As you have not stated the library you use for your modal I can't tell you anything about how to address this but we know this is an issue with common libraries like Bootstrap:
https://www.tiny.cloud/docs/integrations/bootstrap/#usingtinymceinabootstrapdialog
Whatever you are using should have a similar ability.

Nepali/Hindi Keyboard for specific input in React native

Is it possible to show Nepali/Hindi keyboard by default when a specific TextInput is focused in React native?
I have an app that is primarily in Nepali. I want to make it possible for users to input data in Nepali in a TextInput.
Thank you
You can try to write a wrapper over indic keyboard,
Indic Keyboard is a versatile keyboard for Android users who wish to use Indic and Indian languages to type messages, compose emails and generally prefer to use them in addition to English on their phone. You can use this application to type anywhere in your phone that you would normally type in English. It currently supports 23 languages and 54 layouts.

Is there any alternative for JEditorPane (which is in Swing) to implement in CodeName One?

I have a requirement to make a component which can contain formatted text, image or url link. This type of component is available in Java Swing as JEditorPane.
But I didn't get any this type of component or alternative in CodeName One.
Can anybody suggest please ?
If you just want the web browser aspect of JEditorPane then the WebBrowser component should answer all your needs and more (actual native webkit).
However, I'm assuming you are looking for the rich text editing capabilities. Codename One doesn't have this builtin but Steve Hannah implemented a library that encapsulates a JavaScript rich text editor and bridges it to Codename One using the web browser component: https://github.com/shannah/cn1-ckeditor which should allow you roughly the same functionality.

Is it possible to build a WinForm app (or another type of .NET app) which allows me to interact with other windows outside the applicaiton itself?

I'm learning Chinese at the moment and I have gotten my hand on a Chinese dictionary definition.
Now I would like to make an interface.
All I really want the application to do is when I point my mouse pointer over any text on the screen (in any window), it would identify the text I am pointing at and then display a small form over it, which would the chinese transaction.
Is that possible to do? Can WinForms apps interact with windows outside of it's own application?
In C# you can get text under mouse cursor by P/Invoking
GetCursorPos
GetClassName
SendMessage
WM_GETTEXT
WM_GETTEXTLENGTH
WindowFromPoint
Like mentioned here
here is another example in C++
A WinForms application can interact with the Windows of other applications. Window handles exist in a global namespace so if you can get the handle of another application's window you can send it messages. You will have to use pinvoke to do some of this, have a look at WindowFromPoint
However, there is no standardized way to display text in a window; there are dozens of APIs for displaying text. So when you point at text with a mouse, you can only get the pixels, but not necessarily the text.
Some window classes will allow you to send class-specific messages query for the text at a specific location, but many will not. Your best bet is probably to use the same methods that screen readers for the blind use http://en.wikipedia.org/wiki/Screen_reader

Display formatted text in a window using python

I make a program in wxpython which displays questions to the user and a radiobox with answers. Questions and answers should be in a database and is formatted text using some mathematics (paranthesis, root squares etc). Could you propose me what widget I should use for such a text and what could be the database?
Thanks.
For database you can use any sql based DB e.g. mysql or sqllite but if you do not have much data why not just store it in text files or as python module itself.
Displaying math symbols part is tricky, you will need a control which can display MathML(http://en.wikipedia.org/wiki/MathML) , I don't think any wxPython widget can do that, some browsers display MathML, so you may embed browser inside wxpython but that is also tricky.
Another alternative is to use mathplotlib to draw math symbols e.g. see http://matplotlib.sourceforge.net/users/mathtext.html#mathtext-tutorial
but IMO simplest/best way would be to just convert mathml xml to a image file and display it in a image control inside your app.
e.g. you can use http://sourceforge.net/projects/svgmath/ to convert mathml to svg, convert svg to png using http://librsvg.sourceforge.net/
or you can also try http://sourceforge.net/projects/jeuclid/
You will have to experiment to see what is easiest for you but i don't think there is any easy way.

Resources