Until a proper
CPTextView is written this will probably be one of the most full featured rich text editor for Cappuccino.
- Bold, italics, underline, strike through.
- Left, right, center and justify alignment.
- Bulleted and numbered lists.
- Outputs regular HTML.
- Vaguely resembles a proper CPTextView in its API.
WKTextView folder into your
Create and combine the
Resources/WKTextView/closure-editor.js file using the WKTextView modified version of the Closure editor:
git submodule init git submodule update cd auxiliary # Edit build.sh to provide the correct path to closure.jar. sh build.sh
textView = [[WKTextView alloc] initWithFrame:effectiveFrame]; [textView setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable]; [textView setDelegate:self];
The view needs to load resources such as
closure-editor.js. Wait for the
textViewDidLoad: delegate call before using.
A sample program is provided in the
sample folder. To compile and view, run the
samplify.sh script, then open up
index-debug.html in a browser:
sh samplify.sh open sample.dist/index-debug.html
WKTextView is released under the Apache License 2.0. The sample incorporates Creative Commons icons from FamFamFam.
- Alexander Ljungberg, WireLoad Inc
- Evadne Wu
- Klaas Pieter Annema
- Paul Baumgart
- Harry Vangberg