-
Notifications
You must be signed in to change notification settings - Fork 28
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
Rich text editing for notes #45
Comments
When things calm down, try http://code.google.com/p/droid-writer/ |
Could WebView be used meanwhile with that TinyMCE meanwhile? Or is it gonna be too heavy? |
I'll look into it-- it may well be OK. |
(only) Rendering for standalone notes works okay with WebView. However I'm new to android so I ended up adding WebView to list_data.xml to the same row as regular TextView. I make it invisible unless "label" is "note". Perhaps it is a bit ugly to have an extra widget and not showing it thus wasting resources. Otherwise I don't know how could I reuse view without inflating it every time. |
Sounds exciting! If you get the basic functionality working with WebView, we can work out the resource implications later. It should be possible to use a separate layout only when needed, but that should be a simple change and we can leave it for now. |
Turned out that jwysiwyg doesn't want to work inside of the WebView :( I didn't try anything else. Here is yet another approach to reuse wordpress editor. Update |
Do you have a version using TinyMCE built or tagged? Maybe we can get it working by tweaking TinyMCE some. |
The HEAD of my repo has TinyMCE working. But it is a PITA to actually use it. I think it worth adding a setting if user wants just to see notes and edit as html, or use TinyMCE for everything. The problem is with navigation. I can't move cursor in emulator. It jumps from field to field instead of moving between characters. I still have to try it on a real hardware. I've made a stripped copy. Perhaps git submodule with pre-build step to copy jscripts folder would be better. I don't know if git and release versions of TinyMCE are different. Probably they do squeeze space out of javascripts. |
I worked on this some yesterday in the richtext branch (https://github.com/ajlyon/zandy/tree/richtext) -- good work getting something going. Now that I've seen what TinyMCE is like on my phone (Android 2.2, LG Optimus), I see why you shied away from using it. My current approach is using the WebView to display only, as you proposed, but I can't get the WebView to update when I send it new content, and I'm still struggling to get the back button to work. So there's still work to be done! I'll be quiet on this front for several more days, since I have obligations at university for about one week more. Then I'll see what I can do on this and other major Zandy features. |
An option to not use WebView, which might be better for performance: http://developer.android.com/reference/android/text/Html.html |
So what would be the view (class) that shows converted html? |
We can pass a |
I moved this to |
As of 7aa1680, rich text notes are displayed properly. We need a way to edit them as rich text; the status quo is that they are edited as raw HTML. Current thinking is to do this with
SpannableString
, either by writing our own implementation or by importing someone else's, likedroid-writer
.The text was updated successfully, but these errors were encountered: