You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-3Lines changed: 36 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
<h1><imgalign="center"width=50pxheight=50pxsrc="https://github.com/wordpress-mobile/AztecEditor-iOS/raw/develop/RepoAssets/aztec.png"alt="Aztec Logo"/> Aztec: Native HTML Editor for Android</h1>
1
+
<h1><imgalign="center"width=50pxheight=50pxsrc="https://github.com/wordpress-mobile/AztecEditor-Android/raw/trunk/RepoAssets/aztec.png"alt="Aztec Logo"/> Aztec: Native HTML Editor for Android</h1>
For more options, such as edit history, listeners and plugins please refer to the [demo app implementation](https://github.com/wordpress-mobile/AztecEditor-Android/blob/develop/app/src/main/kotlin/org/wordpress/aztec/demo/MainActivity.kt).
62
+
For more options, such as edit history, listeners and plugins please refer to the [demo app implementation](https://github.com/wordpress-mobile/AztecEditor-Android/blob/trunk/app/src/main/kotlin/org/wordpress/aztec/demo/MainActivity.kt).
63
63
64
64
## Build and test
65
65
@@ -119,6 +119,39 @@ dependencies {
119
119
}
120
120
```
121
121
122
+
## Modifications
123
+
124
+
You can use the API to modify Aztec behaviour.
125
+
126
+
### Toolbar items
127
+
128
+
If you want to limit the functionality the Aztec library provides, you can change it calling the `setToolbarItems` method on `AztecToolbar`.
129
+
The following example will enable only `bold`, `plugins` and `list` items in the given order.
You can set new items which are not enabled by default. `ToolbarAction.CODE` and `ToolbarAction.PRE`.
136
+
-`CODE` represents inline HTML code
137
+
-`PRE` represents a preformat block (including code block)
138
+
139
+
### Task list
140
+
141
+
There is an optional list type you can enable in the editor. In addition to ordered and unordered lists you can use `task list`.
142
+
A task list is an unordered list which shows and saves checkboxes instead of the bullets. Enable it by calling the following method.
143
+
```kotlin
144
+
aztecToolbar.enableTaskList()
145
+
```
146
+
147
+
### Nested blocks
148
+
149
+
By default Aztec allows nested blocks. In certain cases this doesn't have to be the preferred behaviour. There is an option to disable nested blocks.
150
+
When switched, this editor will always add media and horizontal rule after the currently selected block, not in the middle of it.
151
+
```kotlin
152
+
aztecText.addMediaAfterBlocks()
153
+
```
154
+
122
155
## Code formatting
123
156
124
157
We use [ktlint](https://github.com/shyiko/ktlint) for Kotlin linting. You can run ktlint using `./gradlew ktlint`, and you can also run `./gradlew ktlintFormat` for auto-formatting. There is no IDEA plugin (like Checkstyle's) at this time.
0 commit comments