-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get attributed string (Highlight) #18
Comments
Does getSelectedHref work? |
I don't use any url in my project, that's why I didnt check. |
I checked it now , getSelectedHref works |
But how can I get attributed string? |
I can get String and URL, but I cannot get attributed string!? |
Ah that's... strange. Typically you can just convert your string to an attributed string like |
In your example : "Good luck!" is bold. When I use getSelectedText, I get the text as String, but I want to get attributed string, then I can know selected text is bold, italic, underline and/or etc. |
Did you try using I'll check on it. Gimme a sec. Edit: ok so it looks like the method is just half-ass broken. I'll probably find some code to replace it from somewhere like TinyMCE. |
Thanks. If you add this function like this, when the user selected some text or moved the cursor to a different position can get attributed string.
You can check this link (https://github.com/OneupNetwork/SQRichTextEditor). |
It's definitely possible, but to make this fix actually work, there's a bit of discussion that I'd have to read over since there's multiple ways "getSelectedHref" can work: cjwirth/RichEditorView#25 |
I can get the string with editorView.getSelectedText, but how can I get attributed string( if it's bold, italic, etc.) ?
The text was updated successfully, but these errors were encountered: