how to create a Textformfield with the ability to place images? - flutter

example 1
Example 2
What I need to create in a specific way is a floatingbutton in which it goes to an addpage, where there will be a textformfield. I want to know how to put images from the gallery in the course of the text, in the middle, has as? If anyone can give me a tip I appreciate it !!!

you can use something like an inline/HTML Editor to achieve that interface.
You can do it in two ways:
Using an HTML editor
You can use this library HTML Editor
Else you can use an inline rich text editor like
Zefyr
Both these solutions would work equally fine.

Related

Creating a Rich Text Editor in Flutter

I am planning to create a rich text editor in Flutter for a personal application. I know there are already some options like zefyr. However, it is still in dev preview and I want to build something a bit different.
The features of the text editor will be that users can add images, bolden text, add lists, italicize text, etc. Just basic text editor things.
Where I am having issues is in the text input side of things. The flutter default text input only allows one style of text per text field. So that would pose a great challenge when it comes to inline styling. Also, a text field cannot have an image inside it, so that is another problem.
If anyone has any ideas on how to go about this, it will be great for a start.
So, I am really asking for the approach to create the editor because it is not as simple as creating one in html

I need to insert an image between text in aem6.0

I need to insert a small image between text as below..
Please click here to see the example
Can I achieve this by using text and image component? If yes, how? Or any other way to achieve this?
You could do this with image but that would require special handing in your script/jsp/htl.
In most of the cases these images are governed via CSS classes and not dragged and drop. You could use the plugins feature of richtext component to create custom styles and apply them to the text. Refer to the Adobe's document here.
It seems you need to add icon in the text configured via RTE. To achieve this you have to build custom plugin by using Coral/Granite UI. This Link will be helpful to develop same sort of functionality.

need to style input from a form with css in real time

Ok im struggling to find anything on this as im probably searching the wrong keywords.
I have a backed form thats use to display content on a page. When entering the details i want to be able to use a basic text editor to style the text, like bold, bullets, underline.
On top of that i would also like to allow them to wrap section in paragraph tabs, apply a certain style i.e style id="x".
Its more for backend so it doesnt have to be really user friendly but if there was an uncomplicated way of showing the styles in the form as i apply them, basically a WYSIWYG view. If not i will settle for applying the styles without having to see all the hmtl and css tags in the editor but when the information is passed via the INSERT query it will show pass all the relevant code like My Style and so on.
Now im quite happy to spend the time learning how to do this if you point me in the right direction but i have no idea what keywords to search. Ideally if there is a script out there i can just edit to my needs would be great too rather than starting from scratch.
Finally since im learning php and mysql still keeping it dumbed down will help and also since my values im passing is going to be full of characters the code wont like what functions should i look up to pass the code and content into the database to avoid breaking the code
I'm not entirely sure what you mean, but it seems you can achieve what you want using an editor like for example TinyMCE in combination with JQuery?
With JQuery you can show/hide items and ander your css like
$("p").mouseover(function () {
$(this).css("color","red");
});

Make pdf reader like functionality in my app (highlight the content)

I need a functionality like in the iphone pdf reader.
i want that user select some text content and that content should be highlighted with yellow color.
Currently i am using text view and want to know that can i achieve same functionality in it.
or i have to shift to pdf ?
Please tell that how to achieve that in either of the two.
You can try NSAttributedString-Additions-for-HTML
Take a look at EGOTextView
A drop-in replacement for UITextView that amongst other things supports attributed strings. This would allow you to achieve your aim of selecting text, and then applying a style to that selection such as a yellow highlight.

GWT text inputs with spell-check like behavior?

Does anyone know of a GWT widget that works like a spelling suggestor?
Ideally it would be similar to this: http://www.polishmywriting.com/
I need a click-triggered popup on user generated text so that I can suggest replacements (I am not building a spell-checker, but something similar). I also really like the way the polishmywriting menu is set up (when you click on an underlined word).
Is there a widget that would allow me to make something similar?
Basically I'm trying to clone the little popups used by spellchecking in Gmail and polishmywriting.
If not, what would be my first step to make it?
Thanks for your time and answers,
DTrejo
Have you had any luck yet? I know it's been quite a lot of time, but found this just now.
It is a very specific widget, so maybe you won't be able to find exactly what you are looking for. In that case, making one from scratch might prove as a challenge.
The first thing you will notice is that a regular gwt TextArea won't do the job of holding the text. You will need something more flexible to dynamically put clickable labels in the text itself.
TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control, released as Open Source.
http://en.wikipedia.org/wiki/TinyMCE
There is also a gwt wrapper available, so you might find that useful:
http://code.google.com/p/tinymce-gwt/
If you check the polishmywriting editor after the spell checking markup is displayed, you will notice it is not a TextArea. The text is a series of paragraphs and the labeled parts are span elements. This are the elements you can easily access with gwt and put some click handlers there to open the popup.
And for the popups, it shouldn't be difficult. Use a standard gwt PopupPanel. The popup panel can be displayed in a relative position to other elements displayed on the page:
popup.showRelativeTo(otherElement);
If you did find something useful in the mean time, feel free to share.