Javafx while selecting text using mouse in webview the selecting word is split or overlap - javafx-2

I want to select the text in webview while i am selecting text content using mouse in webview, the selected text word is split or the mouse selecting first word alignment overlap. how to solve this issue.
Just i have load a simple html file in javafx weview component. while select the text in webview the word is split or overlapping. i am not use any JavaScript.
You can find the doubt in the following link:
enter link description here

WebView not correctly rendering selection areas is a known issue in JavaFX 2.2:
RT-18883 Google docs editing issues
RT-11239 Add draw glyph type support to Prism graphics

Related

Fabric.js / Text Edit on mobile

I'm trying to use TUI Image Editor (https://github.com/nhn/tui.image-editor) in my Cordova app on Android.
It is based on Fabric.js and overall working reasonably, however I have major problems with the text annotation: If the edited text is in the lower part of the screen, the Android softkeyboard is covering the text input and doesn't scroll it into view. This also happens when I run the page in the normal Android Chrome browser.
Are there any recipes or examples how to get that working with Fabric.js?
I had the same problem, and I just avoided using the IText and Textbox objects. I just used the html input field and object with type Text in fabric.js without editing inside canvas, and editing inside input and changing text object to input value. Because if you will use the IText and Textbox objects, you will face problems with editing text on small texts, or text objects with a small scale, where editing inside canvas will be difficult and annoying.
If you still want to scroll to text object I can't give you a full solution. But I think you can use canvas events for text
canvas.on('text:editing:entered', (textObject) => {
// calculate canvas offset and textObject offset and scroll to this position
})

Android Studio Widget, Text Field, Large, Medium and Small Text is missing all I have is Plain which gives a Name. How can I get it and others?

I'm looking at Youtube examples and I see the instructor has Widgets I don't have, Like different size Text Fields and an analogue clock.
Is there somewhere I can get more Widgets?
I obtained a text size same as to the "tutorial" using:
android:textAppearance="#style/TextAppearance.AppCompat.Large"
Looks like AndroidStudio has undergone some change. Best option is to enter the "Text" mode and type the style yourself. For ex. if you need an equivalent of LargeText view, then add a TextView and move onto the Text mode and add this line:
android:textAppearance="#style/?android:attr/textAppearanceLarge"
Or you could also edit the properties of TextView too.
You should add this line android:textAppearance="#android:style/TextAppearance.Large"
inside the TextView after clicking on the Text tab near Design tab located in the middle left to the right of design tab.
but you have to consider that first of all you need to drag and drop TextView from Widgets into the user interface or Design section.
Click into the Text tab located middle left to the right of the Design tab, find the TextView element and within it simply enter this line of code:
style="/?android:attr/textAppearanceLarge"
Remember this line of code has to be within the element in order for it to work.
Go to properties and then select text appearance and select app.
combat.large
Use this:
android:text="Large Text"
android:textAppearance="?android:attr/textAppearanceLarge"
Add it inside your Textview tag.

iOS8 Text view scrolls text down when presented in a controller using autolayout and size classes

I have a view controller laid out in a storyboard using size classes and autolayout. I've added a couple pages of text inside the text view. When I present the controller containing this text view using form sheet style on iPad, the text within the textview is scrolled down, cutting out first 4-5 lines.
How can I make sure that UITextView rearranges it's contents so first line of text is displayed at the top (where it is expected to be)?
Here's what I see in storyboard. When presented, the word "test" is hidden off the top of the textview (where the word play is).
It's a bug with size classes, but here is a workaround:
If your scene in storyboard is bigger than on the device (simulated metrics "freeform"), the auto layout will size down the view and changes the scrolling of the text view.
If you preview the scene with the smallest simulated metrics (iPhone 3.5-inch landscape!), the text view will keep size or grow and the scrolling is ok.

How to add a Scrollable text area to a custom Dialog box?

I'm using InstallShield Professional 2013, and I'm having troubles including a scrollable text area in a custom dialog box (like the SdLincenseE RTF dialog box).
I have tried using a normal Text area but it only displays the raw text. Is there a way to add the scrollable text area so it will display the contents of an rtf file like the SdLicenseEx RTF?
I managed to work around this issue by copying and renaming the SdLicenseEx followed by writing a function to handle the scrollable text area.
If not sure if this is the best way to handle this in an installscript project, but it worked for me.

Qt text editor on picture

I haven't found an exact question on this.
I have a picture, it could be blank for the sake of the example, or contain something that I want to add a fancy caption to. I want to add text editing means (akin to Photoshop) on top of the picture.
I'm thinking about subclassing QGraphicsScene and placing a subclassed QTextEdit object on the scene upon pressing a text placement button. Then, when you click on this object, in addition to editing the text, additional text editing tools become available - so you can set parts of text to bold, italic, modify color, size, etc. And then you would be able to change the object's position - and I think that's available in QGraphicsScene by default. And for the background QBrush, there would be a background picture.
Is this a reasonable solution?
Maybe there are any ready-available examples of this, but I haven't found them yet.
My solution
Text item:
For the text item, I used QGraphicsScene with a subclassed QGraphicsTextItem. For the background picture, I used a QGraphicsRectItem with a QBrush and a loaded picture using QImage methods.
To edit parts of the selected text in this subclassed QGraphicsTextItem:
QTextCharFormat applied to my subclassed QGraphicsTextItem using QGraphicsTextItem::textCursor().mergeCharFormat(...). This way I can change formatting, such as boldness, italics, etc. on the selection only.
Some more thingies:
To pan and zoom around the scene, I used an excellent guide by Vpicaver complete with source code from http://www.qtcentre.org/wiki/index.php?title=QGraphicsView:_Smooth_Panning_and_Zooming

Resources