Knife-Fork

Knife is a rich text editor for Android

License

License

GroupId

GroupId

com.alexvasilkov
ArtifactId

ArtifactId

knife-fork
Last Version

Last Version

1.2.1
Release Date

Release Date

Type

Type

aar
Description

Description

Knife-Fork
Knife is a rich text editor for Android
Project URL

Project URL

https://github.com/alexvasilkov/Knife
Source Code Management

Source Code Management

https://github.com/alexvasilkov/Knife

Download knife-fork

How to add to project

<!-- https://jarcasting.com/artifacts/com.alexvasilkov/knife-fork/ -->
<dependency>
    <groupId>com.alexvasilkov</groupId>
    <artifactId>knife-fork</artifactId>
    <version>1.2.1</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.alexvasilkov/knife-fork/
implementation 'com.alexvasilkov:knife-fork:1.2.1'
// https://jarcasting.com/artifacts/com.alexvasilkov/knife-fork/
implementation ("com.alexvasilkov:knife-fork:1.2.1")
'com.alexvasilkov:knife-fork:aar:1.2.1'
<dependency org="com.alexvasilkov" name="knife-fork" rev="1.2.1">
  <artifact name="knife-fork" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.alexvasilkov', module='knife-fork', version='1.2.1')
)
libraryDependencies += "com.alexvasilkov" % "knife-fork" % "1.2.1"
[com.alexvasilkov/knife-fork "1.2.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Knife

Maven Central

Knife is a rich text editor for Android. Just select text and use one line code to style it.

Fork

Original library was abandoned for 2 years and was distributed with manifest merging problems.

Example

example.gif

Usage

Add dependency to your build.gradle file:

compile 'com.alexvasilkov:knife-fork:1.2.1'

Styling

  • bold(boolean valid) bold the selected text.

  • italic(boolean valid) italic the selected text.

  • underline(boolean valid) <u>underline</u> the selected text.

  • strikethrough(boolean valid) strikethrough the selected text.

  • bullet(boolean valid) bullet the selected text.

  • quote(boolean valid) quote the selected text.

  • link(String link) and link(String link, int start, int end) to link the text.

  • contains(int FORMAT) return true if the selected text contains the FORMAT.

  • clearFormats() clear all formats.

  • fromHtml() import from HTML file.

  • toHtml() export as HTML file.

Custom

  • app:knife_bulletColor

  • app:knife_bulletRadius

  • app:knife_bulletGap

  • app:knife_linkColor

  • app:knife_linkUnderline true to enable link underline.

  • app:knife_quoteColor

  • app:knife_quoteStripeWidth the quote line width.

  • app:knife_quoteGap

Reference

Thanks

License

Copyright 2015 Matthew Lee

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Versions

Version
1.2.1
1.2.0