Safe Textinput text to array on space and clear Input - javascript

Hello you magnificient people,
I am working on a tag system in react native. Text is written in a TextInput field and on space I would like to save the text as a tag in a state array and delete the text from the TextInput. Preferably I would like to include a autocomplete feature. How is this done?
I have looked into onKeyPress, but cannot figure it out, nor with checking on space
Thanks a lot for steering me in the right direction!

Take a look at this package for React Native https://github.com/peterp/react-native-tags it should solve your problem, and it is easy to implement

there are a lot of libraries to help with a few use cases. If it's minor we can build our own logic but if you want many things cover you can go with the libraries and later contribute to them.
One such library for your use case is this: https://github.com/prakhar1989/react-tags#readme

Related

Create Custom Tags for TinyMce or Filter Input?

I don't have a specific technical question, but was hoping to get some thoughts on two different approaches that I am considering. I am trying to build custom shorthand tags for the TinyMCE editor, and most of the tutorials online go the route of creating a custom plugin for the TinyMCE editor, such as this.
When I originally thought about this problem, I didn't think it would be necessary to do this, but rather create a JS script that filtered through the users input and more-or-less did a 'find and replace' - looking for tags and replacing them with whatever.
I think the second approach would be easier and less complicated, but I was just hoping to get some thoughts before I started working on this tomorrow.

How to use html input box with extra properties?

I want to add the ability to use table, bold, paragraph, headings, images and bullets in a text area. How do I achieve this?
i.e. like we get input box in wordpress when we want to publish page.
or
Input box like stack over flow. Now i have options of making text bold, rich, images and many more.
I want the same kind of box.
Please tell me how can I?
Thank you
This is typically solved using a Javascript library. There are many javascript libraries that enable this. An example of a popular one is a javascript library named TinyMCE. They all have clear documentation on how to use them. (No need to repeat instructions here)
https://www.tinymce.com/
#ravisachaniya recommends CKEditor
use tinymce it has a lot more options than you need but you can customize it to your needs https://www.tinymce.com/
You can use CKEditor, i hope solve your isseu
http://ckeditor.com/demo

CKEditor - Make certain text read only

Calling CKEditor gurus to this question. I have a need to make only certain areas within my textbox readonly. These areas will be text and image URLS that will be enclosed by a span tag with a predefined class type. I have checked the documentation but cant seem to find anything that will help me accomplish this. They all make the entire textbox go read only.
I have heard that there are hacks that can make this work, but Im not sure which way to go about doing it. I am fairly new to this, so please bear with me if my question seems absurd.
Thanks for any help..
Use widgets.
Take a look on some samples first and then focus on Placeholder plugin (based on widgets), which does pretty much what you'd like to have. You can either customize it or create something new, referring to existing code and official guides.
Note: You need CKEditor 4.3+.

Is it possible to use web development tools and create an actual working WYSIWYM math editor, like desktop Applications such as MathType?

Before I started to try and make this thing, I wanted to know if it is possible, under the following circumstances:
The code to script up that math must be able to be taken, submitted and stored in a database
The code for two pieces of math which look exactly the same must have the exact same code
According to the requirements, wherever the user clicks his or her mouse, the caret must move to that specific element or part of the math
So, is it possible? I'm looking forward to using technologies such as HTML, JavaScript, jQuery, and even Flash as a last resort.
MathQuill lets you type maths in a WYSIWYG fashion, source here.
There is a demo on the homepage.
I think you want something like MathML. Take a look here. http://www.w3.org/Math/
or maybe http://code.google.com/p/mathmleditor/
I found this a while ago http://www.codecogs.com/latex/eqneditor.php pretty useful implementation of LaTeX with a live preview, I've used it a few times. Probably doesn't fit the bill for your point 3 either but just in case it is useful.

iBooks highlight style for buttons on website

I want to implement a special highlighting to by buttons. The one, I found on the iBooks app for iPhone/iPad suites my needs. I think it is very complex due to the fact that all the strokes are looking different. I could use some CSS-Sprites-Voodoo but I don’t think I will be able to assign these styles so easily. Has anyone done something similar? I would be happy to hear some ideas.
Thanks, Floyd
http://i.stack.imgur.com/SlfHx.png
I tried this out: http://jsfiddle.net/brianflanagan/XUpFc/ Basically, the gist is to grab any selected text and wrap it in a span to give it a class with a background image. Not sure how useful this is, but it might get you started...

Categories

Resources