How to add images into Adobe Flex RichTextEditor? - actionscript-3

How to add images into Adobe Flex RichTextEditor control? I mean using a button =)
So we have some text editor with RTE a-la
editor screenshot http://livedocs.adobe.com/flex/3/html/images/RTE1.png
We want to get into its content images using some button. How to do such thing?
BTW: I found this http://anotherflava.com/2009/01/12/flex-xhtml-rich-text-editor-w-images/ but I really do not understand how to make it work so if any one can publish simple project with simple (DIRTY IS OK) source it would be grate!)))

RichTextEditor is a complex component which consist of few small components and TextArea. So the problem is how to insert image in TextArea.
TextArea can render simple HTML and <img> tag is supported. More about htmlText property here.
So
var myTextEditor:RichTextEditor = new RichTextEditor();
myTextEditor.htmlText = "<img src='myImage.jpg' />"

Related

Tooltip html formatted in angular 2

Is there a tooltip that reads html format text in angular 2?
I have not found anything about this in this forum
I like to use PrimeNg as a component library for angular development.
It provides a lot of useful components and it also has a tooltip component.
https://www.primefaces.org/primeng/#/tooltip
Make sure you put the [escape] property to false to support HTML tags in the content of the tooltip.

TextArea control which i can control colors / fonts

I currently have a textarea control on a page. The user will enter text into the control. The content of the control is bespoke code.
I want to (from code) be able to apply formatting (color / bold / italic / font) to different parts of the text- very much like visual studio.
Like visual studio, and any other IDE, i dont want the user to have control over formatting the textarea- most editors i see give a control which the user can change style.
Any thoughts would be much appreciated.
I'm guessing you're talking about a WYSIWYG editor for a textarea. You should try using TinyMCE or CKEditor. These editors use a html attribute called 'contentEditable'. So by setting this attribute to true (e.g. <p contentEditable="true"></p>) they can then use the content editable javascript methods to edit it, providing an interface that calls the javascript of course. You can read a little about contentEditable and the similar attribute designMode here on WebMonkey.

HTML in WP7 without webbrowser control

Is there a control in WP7, other than a WebBrowser, which can display basic HTML (a few <p>s, <b>s, <i>s, <div>s and <span>s) inline?
I cannot use a WebBrowser for my app because I need the control to live inside a pivot (i.e. not swallow any gestures), and to keep the background of the rest of the pivot.
If it's basic markup you can always transform the HTML with the help of the HTML Agility Pack to a RichTextBox. (See: http://debugmode.net/2011/06/02/richtextbox-in-windows-phone-7-1-or-mango/)
This is pretty simple to do with the WebBrowser control if you have a solid color background. Basically you have the WebBroswer adjust the background color of the HTML content, and disable hit testing to stop the control from eating your gestures.
Some code examples can be found in this article:
http://blogs.msdn.com/b/mikeormond/archive/2010/12/16/displaying-html-content-in-windows-phone-7.aspx
'Other' options for rendering HTML content in SL/WP7 tend to bite me in the rear in the long run.

HTML + CSS dynamic render in flash?

I have HTML + CSS text. I need some lib with simple function like "Render String Var conteining HTML" So no external files (like in flash lib called HTMLwraper you just have to play your SWF on top of HTML). dinamic! I give it string it renders It into some conteiner (not as a bitmab but as if it was real HTML dynamically rendered in flash). (And I need real HTML + CSS support not what normal rich text block gives us)
I am going to use it in with Flex (Flash Builder) so I like MXML component model but even pure flash AS3 will workout.
It should be Free and Opensource (any license like GPL, LGPL etc will be ok).
So Is out there such flash\flex library for HTML + CSS dynamic rendering (rfom given String or XML)?
Sounds like you're asking for quite a lot ;-)
The only thing that springs to mind that might be able to help is F*CSS
Take a look here: http://fcss.flashartofwar.com/
HTH
Jolyon

Loaded HTML Text In Flash not displaying with BlendMode.LAYER

Have a textField in which I'm loading HTML formated text into it. This textField sits inside a parent container which has its blendMode property set to BlendMode.LAYER. When I run the movie, the html text doesn't display. Any clues why?
textField.embedFont = true;
textField.defaultformat = new Format("EmbedFontName");
Do you have something like this?
or embed font characters?
If it doesn't work with normal blend mode either:
Does the loaded html contain unsupported html tags? Flash text fields support only a limited subset of html tags.
If not, it could be embedded fonts issue as konrad suggested.