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

Issue/562 add underline #1370

Merged
merged 14 commits into from
Oct 4, 2019
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ protected ReactAztecText createViewInstance(ThemedReactContext reactContext) {
new LinkFormatter.LinkStyle(
Color.parseColor("#016087"), true)
));
aztecText.addPlugin(new CssUnderlinePlugin());
return aztecText;
}

Expand Down Expand Up @@ -413,7 +414,6 @@ public void disableGBMode(final ReactAztecText view, boolean disable) {
view.addPlugin(new VideoShortcodePlugin());
view.addPlugin(new AudioShortcodePlugin());
view.addPlugin(new HiddenGutenbergPlugin(view));
view.addPlugin(new CssUnderlinePlugin());
view.setImageGetter(new GlideImageLoader(view.getContext()));
view.setVideoThumbnailGetter(new GlideVideoThumbnailLoader(view.getContext()));
// we need to restart the editor now
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public class ReactAztecText extends AztecText {
put(AztecTextFormat.FORMAT_ITALIC, "italic");
put(AztecTextFormat.FORMAT_CITE, "italic");
put(AztecTextFormat.FORMAT_STRIKETHROUGH, "strikethrough");
put(AztecTextFormat.FORMAT_UNDERLINE, "underline");
}
};

Expand Down Expand Up @@ -481,6 +482,9 @@ public void setActiveFormats(Iterable<String> newFormats) {
case "strikethrough":
newFormatsSet.add(AztecTextFormat.FORMAT_STRIKETHROUGH);
break;
case "underline":
newFormatsSet.add(AztecTextFormat.FORMAT_UNDERLINE);
break;
}
}
selectedStylesSet.removeAll(typingFormatsMap.keySet());
Expand Down