Skip to content
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

Some more features #288

Open
wants to merge 133 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
516b794
update gradle, SDK 33
niendo1 Dec 21, 2022
ec9e39b
update gradle, SDK 30
niendo1 Dec 23, 2022
dfa8b91
merge HTML & css files
niendo1 Dec 23, 2022
5196528
update README
niendo1 Dec 23, 2022
9275f8b
update Project.xml
niendo1 Dec 23, 2022
07266bd
merge HTML & CSS files
niendo1 Dec 23, 2022
831644f
add support to receive data from JS via callbacks
niendo1 Dec 23, 2022
bde70c7
add setText[Background]Color(String)
niendo1 Dec 23, 2022
f9f8a0b
add
niendo1 Dec 23, 2022
61ce991
sample for getSelected text.
niendo1 Dec 23, 2022
1a1d136
new line missing
niendo1 Dec 23, 2022
af4a226
add file runConfigurations.xml
niendo1 Dec 23, 2022
3239077
add
niendo1 Dec 23, 2022
381a55a
add
niendo1 Dec 24, 2022
2897d92
replace TodDo with checkbox, that is actually saved
niendo1 Dec 24, 2022
d8fde41
fix some missing js
niendo1 Dec 24, 2022
0f9d19b
add missing icons
niendo1 Dec 24, 2022
1c9dac0
add table support
niendo1 Dec 24, 2022
66acd6b
improve table support
niendo1 Dec 26, 2022
1de1917
optimize insertImage & video
niendo1 Dec 28, 2022
2cc31e2
optimize insertImage & video
niendo1 Dec 28, 2022
534c039
build updates, new version
niendo1 Dec 28, 2022
233606a
normalize.css to v8.0.1
niendo1 Dec 28, 2022
42cbb9a
update gradle to 7.6
niendo1 Dec 28, 2022
6d5c885
update gradle to 7.6
niendo1 Dec 28, 2022
3f00e9e
Revert "normalize.css to v8.0.1"
niendo1 Dec 28, 2022
65b0160
Revert "Revert "normalize.css to v8.0.1""
niendo1 Dec 28, 2022
e30c9de
add CollapsibleSection
niendo1 Dec 28, 2022
f423a62
add CollapsibleSection
niendo1 Dec 28, 2022
091a713
add insertImageAsBase64
niendo1 Dec 28, 2022
bc8b755
add insertImageAsBase64
niendo1 Dec 28, 2022
8248a70
fundamental fixes to get it run
niendo1 Dec 31, 2022
56a5d0b
update libs
niendo1 Dec 31, 2022
043678a
add remove_format to sample app
niendo1 Dec 31, 2022
a5f60dc
add remove_format to sample app
niendo1 Dec 31, 2022
fb619c1
Merge remote-tracking branch 'origin/master'
niendo1 Dec 31, 2022
3a3c963
add Checkbox without ID
niendo1 Jan 6, 2023
d7e6177
fix insertLink
niendo1 Jan 7, 2023
7aec391
for insertImage & Video, width is set automatically if nothing given
niendo1 Jan 7, 2023
1d7def0
add listener to checkbox and section after reload
niendo1 Jan 13, 2023
974118d
add listener to checkbox and section after reload
niendo1 Jan 13, 2023
11963d7
insertImage and InsertVideo width and height as Strings
niendo1 Jan 13, 2023
29f0c97
* add better youtube example
niendo1 Jan 13, 2023
43cbea5
* add fontFamily support
niendo1 Jan 14, 2023
6e0b0c4
* InsertVideo gets attribute alt as well
niendo1 Jan 14, 2023
5a441a4
* support for LoadFont()
niendo1 Jan 16, 2023
9fec3f3
* update How to use
niendo1 Jan 16, 2023
70251b7
* update How to use
niendo1 Jan 16, 2023
4d13be2
* update gradle 7.4.0
niendo1 Jan 19, 2023
5711977
* new icon for cursive
niendo1 Jan 19, 2023
d94644d
* fix README.md
niendo1 Jan 21, 2023
7a35f57
fix cursive icon
niendo1 Jan 23, 2023
7a368c8
working on callback
niendo1 Jan 23, 2023
b312721
remove setHTML_asCallBack
niendo1 Feb 2, 2023
d05e9dc
gradle:7.4.1
niendo1 Feb 4, 2023
595c87d
work on callbacks
niendo1 Feb 8, 2023
047c049
work on callbacks
niendo1 Feb 10, 2023
d3ed517
clean up and fix checkboxes and links
niendo1 Feb 11, 2023
9094ad0
fix setFontsize(), Bullet- and Numbered lists
niendo1 Feb 13, 2023
761b42d
fixes for sections
niendo1 Feb 15, 2023
ce44094
add callback "loaded"
niendo1 Feb 22, 2023
66235f5
test
niendo1 Mar 19, 2023
7ad700e
get HTML from selected range
niendo1 Mar 19, 2023
c91876c
update gradle 7.4.2
niendo1 Mar 19, 2023
9ae3bce
upgrade gradle
niendo1 Mar 26, 2023
93d446b
add toggle from kishannareshpal for bold, italic, underline and trike…
niendo1 Mar 26, 2023
00704e9
add section PRE
niendo1 Mar 28, 2023
fd0e545
* <Enter> just add a line break
niendo1 Mar 28, 2023
c69bc57
fix lists
niendo1 Mar 28, 2023
498bdf0
cleanup jcenter
niendo1 Apr 18, 2023
110befb
gradle 8.0.0
niendo1 Apr 23, 2023
4e87f12
readme
niendo1 Apr 26, 2023
6799f32
readme
niendo1 Apr 26, 2023
41f0e13
readme
niendo1 Apr 26, 2023
6804fd1
add dialog for insert image
niendo1 Apr 28, 2023
923b67e
html cleanups
niendo1 Apr 28, 2023
ef32e60
fix insertImageAsBase64
niendo1 Apr 28, 2023
d79c0a2
merge fixes
niendo1 Apr 29, 2023
063b0cd
some git geraffel
niendo1 Apr 29, 2023
6d2073c
fix image scale
niendo1 May 6, 2023
d48de7a
insertImageAsBase64() shrinking optional
niendo1 May 7, 2023
142d9e9
niendo1 <[email protected]>
niendo1 Dec 15, 2023
97a160c
niendo1 <[email protected]>
niendo1 Dec 17, 2023
39ddf8e
prepare jitpack
niendo1 Dec 18, 2023
d1ff059
prepare jitpack
niendo1 Dec 18, 2023
9d8feb9
prepare jitpack
niendo1 Dec 18, 2023
571f8e9
prepare jitpack
niendo1 Dec 18, 2023
9475065
prepare jitpack
niendo1 Dec 18, 2023
a72e502
prepare jitpack
niendo1 Dec 18, 2023
0f8f60a
prepare jitpack
niendo1 Dec 18, 2023
83e11e2
prepare jitpack
niendo1 Dec 18, 2023
fcf71fe
prepare jitpack
niendo1 Dec 18, 2023
d4ed6e7
prepare jitpack
niendo1 Dec 19, 2023
1ec2201
prepare jitpack
niendo1 Dec 19, 2023
1f4403e
prepare jitpack
niendo1 Dec 19, 2023
06301cf
prepare jitpack
niendo1 Dec 19, 2023
c613a37
prepare jitpack
niendo1 Dec 19, 2023
d79acf3
prepare jitpack
niendo1 Dec 19, 2023
b79c937
prepare jitpack
niendo1 Dec 19, 2023
5ab9368
prepare jitpack
niendo1 Dec 19, 2023
4559458
prepare jitpack
niendo1 Dec 19, 2023
59d427d
prepare jitpack
niendo1 Dec 19, 2023
6d8f1bc
prepare jitpack
niendo1 Dec 19, 2023
ed972e7
add some javadoc
niendo1 Dec 20, 2023
21c5c2f
README fixes
niendo1 Dec 28, 2023
a3d5d3c
javadoc changes
niendo1 Dec 28, 2023
fe50f53
clean up api for v3.0.0
niendo1 Jan 5, 2024
336c077
gradle 8.2.1
niendo1 Jan 6, 2024
9d19ff5
height and width of insert functions (video, image etc.) …
niendo1 Jan 8, 2024
eccae7e
fixes for InsertImage
niendo1 Jan 11, 2024
a1c024b
version 3.0.0
niendo1 Jan 11, 2024
1e5837b
fix readme: How do I use it?
niendo1 Feb 16, 2024
11d95bf
insertHTML now according to setHTML
niendo1 Feb 23, 2024
147b697
insertHTML now according to setHTML
niendo1 Feb 26, 2024
b54e55a
insertHTML now according to setHTML
niendo1 Feb 26, 2024
bd9b255
update gradle and target version
niendo1 Feb 26, 2024
b8d83b3
add requestFocusFromTouch();
niendo1 Apr 10, 2024
4a12e99
jitpack trouble
niendo1 Apr 10, 2024
a8e220b
jitpack trouble
niendo1 Apr 10, 2024
14b3e41
jitpack trouble
niendo1 Apr 10, 2024
9385404
jitpack trouble
niendo1 Apr 10, 2024
845e432
jitpack trouble
niendo1 Apr 10, 2024
fd93382
jitpack trouble
niendo1 Apr 10, 2024
a82b781
requestFocusFromTouchTest
niendo1 Apr 11, 2024
fdd0b88
setTextColor("") resets to default color
niendo1 Apr 11, 2024
73f0872
setTextColor("initial") resets to default color
niendo1 Apr 11, 2024
a32bc31
add onWindowFocusChanged() by IntuzMayurS
niendo1 Apr 12, 2024
4b12a42
ReadMe/ChangeLog
niendo1 Apr 12, 2024
277e37a
v3.0.2
niendo1 Apr 15, 2024
a26b549
"fix" applicationTests
niendo1 Apr 15, 2024
0c5e649
readme update
niendo1 May 21, 2024
948de8a
V3.0.3
niendo1 Dec 1, 2024
3e2def7
Build/gradle updates
niendo1 Dec 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 3 additions & 17 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions .idea/runConfigurations.xml

This file was deleted.

50 changes: 49 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,54 @@
Change Log
==========

Version 3.0.3 *(2024-12-08)*
----------------------------

Bugfix:

Feature:

Update:
- gradle-lib:8.7.3
- gradle:8.11.1
- appcompat:1.7.0
- kotlin-bom:2.0.2
- COMPILE_SDK_VERSION=35
- TARGET_SDK_VERSION=35

Version 3.0.2 *(2024-04-15)*
----------------------------

Bugfix:
- add onWindowFocusChanged() by IntuzMayurS

Feature:
- setTextColor("initial") resets to default text color
- setBackgroundColor("initial") resets to default background color

Update:
- gradle:8.3.2
- openjdk17 from 21 for jitpack
- gradle-8.7


Version 3.0.1 *(2024-02-26)*
----------------------------

Bugfix:
- insertHTML now according to setHTML

Update:
- gradle:8.2.2
- Compile / Target SDK Version 3x -> 34


Version 3.0.0 *(2024-01-11)*
----------------------------

Feature:
- New version, new author: lots of changes

Version 2.0.0 *(2020-09-16)*
----------------------------

Expand All @@ -14,7 +62,7 @@ Update:

Bugfix:
- Fixed placeholder [#240](https://github.com/wasabeef/richeditor-android/pull/240)
- Fixed typp [#194](https://github.com/wasabeef/richeditor-android/pull/194)
- Fixed typo [#194](https://github.com/wasabeef/richeditor-android/pull/194)
- Fixed Url decoding [#123](https://github.com/wasabeef/richeditor-android/pull/123)
- Fixed shouldOverrideUrlLoading [#133](https://github.com/wasabeef/richeditor-android/pull/133)
- Use encodeURIComponent() [#145](https://github.com/wasabeef/richeditor-android/pull/145)
Expand Down
128 changes: 94 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
<p align="center">
<a href="https://pub.dev/packages/flutter_gen">
<img src="https://github.com/wasabeef/richeditor-android/raw/master/art/logo.png" width="480px"/>
</a>
<p style="text-align: center;">
<img src="https://github.com/niendo1/richeditor-android/raw/master/art/logo.png" width="480px" alt="Logo"/>
</p>
<p align="center">
<a href="https://android-arsenal.com/details/1/1696">
<img src="https://img.shields.io/badge/Android%20Arsenal-richeditor--android-brightgreen.svg?style=flat">
</a>
<a href="https://www.apache.org/licenses/LICENSE-2.0">
<img src="https://img.shields.io/badge/license-Apache%202-blue.svg" />
</a>
<a href="https://search.maven.org/artifact/jp.wasabeef/richeditor-android">
<img src="https://maven-badges.herokuapp.com/maven-central/jp.wasabeef/richeditor-android/badge.svg" />
</a>
<p style="text-align: center;">
<a href="https://www.apache.org/licenses/LICENSE-2.0"><img src="https://img.shields.io/badge/license-Apache%202-blue.svg" alt="License Apache 2.0"/></a>
<a href="https://jitpack.io/#niendo1/richeditor-android"><img src="https://jitpack.io/v/niendo1/richeditor-android.svg" alt="JitPack-Lib"/></a>
<a href="https://javadoc.jitpack.io/com/github/niendo1/richeditor-android/latest/javadoc/"><img src="https://github.com/niendo1/richeditor-android/raw/master/art/javadoc.svg" alt="JavaDoc"/></a>
</p>

`RichEditor for Android` is a beautiful Rich Text `WYSIWYG Editor` for `Android`.
---

This is a fork, which tries to merge changes from [Andrew-Chen-Wang/RichEditorView](https://github.com/Andrew-Chen-Wang/RichEditorView)

---

`RichEditor for Android` is a beautiful HTML `WYSIWYG Editor` for `Android` based on webview.

- _Looking for iOS? Check out_ [cjwirth/RichEditorView](https://github.com/cjwirth/RichEditorView)

Expand All @@ -24,6 +22,7 @@ Supported Functions

![Toolbar](./art/demo.gif)

- [x] (new?) Remove Format
- [x] Bold
- [x] Italic
- [x] Subscript
Expand All @@ -34,6 +33,7 @@ Supported Functions
- [x] Justify Center
- [x] Justify Right
- [x] Blockquote
- [x] (new) Pre-Section
- [x] Heading 1
- [x] Heading 2
- [x] Heading 3
Expand All @@ -44,17 +44,29 @@ Supported Functions
- [x] Redo
- [x] Indent
- [x] Outdent
- [x] (new) Insert HTML Code
- [x] (new) Insert Horizontal Line
- [x] Insert Image
- [x] (new) Insert Inline Image
- [x] Insert Youtube
- [x] Insert iframe (new)
- [x] Insert Video
- [x] Insert Audio
- [x] Insert Link
- [x] Checkbox
- [x] Text Color
- [x] (new) Text Color (String)
- [x] Text Background Color
- [x] (new) Text Background Color (String)
- [x] (new) Font Family
- [x] Text Font Size
- [x] Unordered List (Bullets)
- [x] Ordered List (Numbers)
- [x] (new) Get Selected Text
- [x] (new) Get Selected Href
- [x] (new) Table
- [x] (new) Collapsible Section
- [x] (new) Run and acquire data direct from JavaScript (requestJSData)

Attribute change of editor
---
Expand All @@ -64,11 +76,9 @@ Attribute change of editor
- [x] Height
- [x] Placeholder
- [x] Load CSS
- [x] State Callback

**Milestone**

- [ ] Font Family
- [x] (new) Load Font
- [x] (new) getFontFamily
- [x] State Callback

Demo
---
Expand All @@ -81,15 +91,56 @@ How do I use it?
### Setup

##### Gradle
```groovy

```gradle
repositories {
mavenCentral()
mavenCentral()
maven { url "https://jitpack.io" }
}

dependencies {
implementation 'jp.wasabeef:richeditor-android:2.0.0'
implementation 'com.github.niendo1:richeditor-android:3.0.2'
}
```

##### Maven

```xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
```

```xml
<dependency>
<groupId>com.github.niendo1</groupId>
<artifactId>richeditor-android</artifactId>
<version>3.0.2</version>
</dependency>

```

##### leiningen

```leiningen

:repositories [["jitpack" "https://jitpack.io"]]
:dependencies [[com.github.niendo1/richeditor-android "3.0.2"]]

```

##### sbt

```sbt

resolvers += "jitpack" at "https://jitpack.io"
libraryDependencies += "com.github.niendo1" % "richeditor-android" % "3.0.2"

```

### Default Setting for Editor
---

Expand All @@ -102,6 +153,8 @@ editor.setEditorHeight(200);
```java
editor.setEditorFontSize(22);
editor.setEditorFontColor(Color.RED);
editor.setTextColor("initial");
editor.setFontFamily("fantasy");
```

**Background**
Expand All @@ -123,7 +176,9 @@ editor.setPlaceholder("Insert text here...");
```

**Others**
Please refer the [samples](https://github.com/wasabeef/richeditor-android/blob/master/sample/src/main/java/jp/wasabeef/sample/MainActivity.java) for usage.
Please refer
the [samples](https://github.com/niendo1/richeditor-android/blob/master/sample/src/main/java/jp/wasabeef/sample/MainActivity.java)
for usage.

### Functions for ContentEditable
---
Expand All @@ -146,7 +201,7 @@ editor.insertImage("https://raw.githubusercontent.com/wasabeef/art/master/twitte
**Text Change Listener**
```java
RichEditor editor = (RichEditor) findViewById(R.id.editor);
editor. setOnTextChangeListener(new RichEditor.OnTextChangeListener() {
editor.setOnTextChangeListener(new RichEditor.OnTextChangeListener() {
@Override
public void onTextChange(String text) {
// Do Something
Expand All @@ -156,31 +211,35 @@ editor. setOnTextChangeListener(new RichEditor.OnTextChangeListener() {
```

**Others**
Please refer the [samples](https://github.com/wasabeef/richeditor-android/blob/master/sample/src/main/java/jp/wasabeef/sample/MainActivity.java) for usage.
Please refer
the [samples](https://github.com/niendo1/richeditor-android/blob/master/sample/src/main/java/jp/wasabeef/sample/MainActivity.java)
for usage.

Requirements
--------------
Android 4+
Android 7+ (Level 24)

Applications using RichEditor for Android
---

Please [ping](mailto:[email protected]) me or send a pull request if you would like to be added here.
Please [ping](mailto:[email protected]) me or send a pull request if you would like to be added here.

Icon | Application
------------ | -------------
<img src="https://lh6.ggpht.com/6zKH_uQY1bxCwXL4DLo_uoFEOXdShi3BgmN6XRHlaJ-oA1svmq6y1PZkmO50nWQn2Lg=w300-rw" width="48" height="48" /> | [Ameba Ownd](https://play.google.com/store/apps/details?id=jp.co.cyberagent.madrid)
<img src="https://lh3.googleusercontent.com/st_DiIlM148vzG23ccujtBzx0tMeb7cDC5fDmLSERS-Nr8M_F-PTw4W_jWJsH9mO_b4=w300-rw" width="48" height="48" /> | [ScorePal](https://play.google.com/store/apps/details?id=com.hfd.scorepal)
| Icon | Application |
|----------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|
| <img src="https://lh6.ggpht.com/6zKH_uQY1bxCwXL4DLo_uoFEOXdShi3BgmN6XRHlaJ-oA1svmq6y1PZkmO50nWQn2Lg=w300-rw" width="48" height="48" /> | [Ameba Ownd](https://play.google.com/store/apps/details?id=jp.co.cyberagent.madrid) |
| <img src="https://lh3.googleusercontent.com/st_DiIlM148vzG23ccujtBzx0tMeb7cDC5fDmLSERS-Nr8M_F-PTw4W_jWJsH9mO_b4=w300-rw" width="48" height="48" /> | [ScorePal](https://play.google.com/store/apps/details?id=com.hfd.scorepal) |
| <img src="https://github.com/niendo1/ImapNotes3/blob/master/fastlane/metadata/android/en-US/images/icon.png" width="48" height="48" /> | [ImapNotes3](https://f-droid.org/packages/de.niendo.ImapNotes3/) |

Developed By
-------
Daichi Furiya (Wasabeef) - <[email protected]>

<a href="https://twitter.com/wasabeef_jp">
<img alt="Follow me on Twitter"
src="https://raw.githubusercontent.com/wasabeef/art/master/twitter.png" width="75"/>
<img alt="Follow me on Twitter" src="https://raw.githubusercontent.com/wasabeef/art/master/twitter.png" width="75"/>
</a>

Peter Korf (niendo) - <[email protected]>

Thanks
-------

Expand All @@ -189,6 +248,7 @@ Thanks
License
-------

Copyright (C) 2022-2024 niendo
Copyright (C) 2020 Wasabeef

Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
1 change: 1 addition & 0 deletions art/javadoc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading