├── .java-version
├── glide-loader
├── .gitignore
├── src
│ └── main
│ │ ├── res
│ │ └── values
│ │ │ └── strings.xml
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ └── org
│ │ └── wordpress
│ │ └── aztec
│ │ └── glideloader
│ │ └── extensions
│ │ └── BitmapExtension.kt
└── proguard-rules.pro
├── media-placeholders
├── .gitignore
├── src
│ └── main
│ │ ├── res
│ │ └── values
│ │ │ └── strings.xml
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ └── org
│ │ └── wordpress
│ │ └── aztec
│ │ └── placeholders
│ │ └── PlaceholderBackspaceListener.kt
└── proguard-rules.pro
├── picasso-loader
├── .gitignore
├── src
│ └── main
│ │ ├── res
│ │ └── values
│ │ │ └── strings.xml
│ │ └── AndroidManifest.xml
└── proguard-rules.pro
├── wordpress-comments
├── .gitignore
├── src
│ └── main
│ │ ├── res
│ │ ├── values
│ │ │ └── strings.xml
│ │ ├── layout
│ │ │ ├── page_button.xml
│ │ │ └── more_button.xml
│ │ └── drawable
│ │ │ ├── format_bar_button_more_selector.xml
│ │ │ ├── format_bar_button_page_selector.xml
│ │ │ ├── format_bar_button_more.xml
│ │ │ ├── format_bar_button_more_disabled.xml
│ │ │ ├── format_bar_button_more_highlighted.xml
│ │ │ ├── format_bar_button_page.xml
│ │ │ ├── format_bar_button_page_disabled.xml
│ │ │ └── format_bar_button_page_highlighted.xml
│ │ └── java
│ │ └── org
│ │ └── wordpress
│ │ └── aztec
│ │ └── plugins
│ │ └── wpcomments
│ │ ├── CommentsTextFormat.kt
│ │ ├── handlers
│ │ └── GutenbergCommentHandler.kt
│ │ ├── spans
│ │ ├── GutenbergInlineCommentSpan.kt
│ │ ├── GutenbergCommentSpan.kt
│ │ └── WordPressCommentSpan.kt
│ │ └── toolbar
│ │ └── CommentsToolbarAction.kt
└── proguard-rules.pro
├── wordpress-shortcodes
├── .gitignore
├── src
│ └── main
│ │ └── res
│ │ └── values
│ │ └── strings.xml
└── proguard-rules.pro
├── code_editor.png
├── visual_editor.png
├── RepoAssets
└── aztec.png
├── .idea
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── vcs.xml
└── inspectionProfiles
│ └── Project_Default.xml
├── aztec
├── src
│ └── main
│ │ ├── kotlin
│ │ └── org
│ │ │ └── wordpress
│ │ │ └── aztec
│ │ │ ├── spans
│ │ │ ├── MarkForReplay.kt
│ │ │ ├── MarkForDeletion.kt
│ │ │ ├── AztecVisualLinebreak.kt
│ │ │ ├── IAztecLineBlockSpan.kt
│ │ │ ├── FullWidthImageProcessingMarker.kt
│ │ │ ├── IAztecCompositeBlockSpan.kt
│ │ │ ├── IAztecSurroundedWithNewlines.kt
│ │ │ ├── IAztecFullWidthImageSpan.kt
│ │ │ ├── AztecCursorSpan.kt
│ │ │ ├── AztecRelativeSizeBigSpan.kt
│ │ │ ├── AztecRelativeSizeSmallSpan.kt
│ │ │ ├── AztecTypefaceMonospaceSpan.kt
│ │ │ ├── AztecStyleBoldSpan.kt
│ │ │ ├── AztecStyleItalicSpan.kt
│ │ │ ├── CommentSpan.kt
│ │ │ ├── IAztecInlineSpan.kt
│ │ │ ├── AztecMediaClickableSpan.kt
│ │ │ ├── UnknownClickableSpan.kt
│ │ │ ├── AztecSubscriptSpan.kt
│ │ │ ├── AztecSuperscriptSpan.kt
│ │ │ ├── AztecRelativeSizeSpan.kt
│ │ │ ├── AztecStrikethroughSpan.kt
│ │ │ ├── IAztecAlignmentSpan.kt
│ │ │ ├── FontSpan.kt
│ │ │ ├── IAztecBlockSpan.kt
│ │ │ ├── IAztecParagraphStyle.kt
│ │ │ ├── AztecUnderlineSpan.kt
│ │ │ ├── AztecTypefaceSpan.kt
│ │ │ ├── IParagraphFlagged.kt
│ │ │ ├── IAztecSpan.kt
│ │ │ ├── AztecStyleCiteSpan.kt
│ │ │ ├── AztecStyleStrongSpan.kt
│ │ │ ├── AztecStyleEmphasisSpan.kt
│ │ │ ├── AztecHorizontalRuleSpan.kt
│ │ │ ├── AztecStyleSpan.kt
│ │ │ ├── AztecBackgroundColorSpan.kt
│ │ │ ├── IAztecAttributedSpan.kt
│ │ │ ├── UnknownHtmlSpan.kt
│ │ │ └── AztecImageSpan.kt
│ │ │ ├── plugins
│ │ │ ├── IAztecPlugin.kt
│ │ │ ├── html2visual
│ │ │ │ ├── IHtmlPreprocessor.kt
│ │ │ │ ├── ISpanPostprocessor.kt
│ │ │ │ ├── IHtmlTextHandler.kt
│ │ │ │ ├── IHtmlTagHandler.kt
│ │ │ │ ├── IHtmlContentHandler.kt
│ │ │ │ └── IHtmlCommentHandler.kt
│ │ │ ├── visual2html
│ │ │ │ ├── IHtmlPostprocessor.kt
│ │ │ │ └── ISpanPreprocessor.kt
│ │ │ ├── IMediaToolbarButton.kt
│ │ │ ├── IOnDrawPlugin.kt
│ │ │ ├── CssBackgroundColorPlugin.kt
│ │ │ └── UrlPastePlugin.kt
│ │ │ ├── watchers
│ │ │ └── event
│ │ │ │ ├── sequence
│ │ │ │ └── EventSequence.kt
│ │ │ │ ├── text
│ │ │ │ ├── AfterTextChangedEventData.kt
│ │ │ │ ├── OnTextChangedEventData.kt
│ │ │ │ └── BeforeTextChangedEventData.kt
│ │ │ │ ├── IEventInjector.kt
│ │ │ │ └── buckets
│ │ │ │ ├── Bucket.kt
│ │ │ │ ├── API25Bucket.kt
│ │ │ │ └── API26Bucket.kt
│ │ │ ├── IHistoryListener.kt
│ │ │ ├── handlers
│ │ │ ├── QuoteHandler.kt
│ │ │ ├── PreformatHandler.kt
│ │ │ └── ListHandler.kt
│ │ │ ├── exceptions
│ │ │ └── DynamicLayoutGetBlockIndexOutOfBoundsException.kt
│ │ │ ├── toolbar
│ │ │ ├── ToolbarActionType.kt
│ │ │ ├── IAztecToolbar.kt
│ │ │ └── IAztecToolbarClickListener.kt
│ │ │ ├── extensions
│ │ │ └── EnumExtensions.kt
│ │ │ ├── AztecAttributesExtension.kt
│ │ │ ├── ITextFormat.kt
│ │ │ ├── formatting
│ │ │ └── AztecFormatter.kt
│ │ │ ├── AlignmentRendering.kt
│ │ │ ├── Constants.kt
│ │ │ ├── DeleteOverrideInputConnection.kt
│ │ │ ├── AztecPart.kt
│ │ │ └── util
│ │ │ └── CleaningUtils.kt
│ │ └── res
│ │ ├── values
│ │ ├── integers.xml
│ │ └── bools.xml
│ │ ├── drawable
│ │ ├── format_bar_button_highlight_background.xml
│ │ ├── ic_checkbox.xml
│ │ ├── background_block_editor.xml
│ │ ├── bg_key.xml
│ │ ├── format_bar_button_ellipsis_vertical_selector.xml
│ │ ├── format_bar_button_ellipsis_horizontal_selector.xml
│ │ ├── img_hr.xml
│ │ ├── ic_baseline_check_24.xml
│ │ ├── format_bar_button_ol_selector.xml
│ │ ├── format_bar_button_ul_selector.xml
│ │ ├── format_bar_button_highlight_with_background.xml
│ │ ├── format_bar_button_heading_selector.xml
│ │ ├── format_bar_button_indent_selector.xml
│ │ ├── format_bar_button_outdent_selector.xml
│ │ ├── format_bar_button_tasklist_selector.xml
│ │ ├── format_bar_button_heading_1_selector.xml
│ │ ├── format_bar_button_heading_2_selector.xml
│ │ ├── format_bar_button_heading_3_selector.xml
│ │ ├── format_bar_button_heading_4_selector.xml
│ │ ├── format_bar_button_heading_5_selector.xml
│ │ ├── format_bar_button_heading_6_selector.xml
│ │ ├── format_bar_button_highlight_disabled_with_background.xml
│ │ ├── format_bar_button_highlight_highlighted_with_background.xml
│ │ ├── format_bar_button_horizontal_rule.xml
│ │ ├── format_bar_button_media_expanded_selector.xml
│ │ ├── format_bar_button_media_collapsed_selector.xml
│ │ ├── format_bar_button_horizontal_rule_disabled.xml
│ │ ├── format_bar_button_horizontal_rule_highlighted.xml
│ │ ├── format_bar_button_horizontal_rule_selector.xml
│ │ ├── format_bar_button_heading.xml
│ │ ├── format_bar_button_heading_disabled.xml
│ │ ├── format_bar_button_heading_highlighted.xml
│ │ ├── format_bar_button_italic.xml
│ │ ├── format_bar_button_italic_disabled.xml
│ │ ├── format_bar_button_italic_highlighted.xml
│ │ ├── format_bar_button_pre_selector.xml
│ │ ├── format_bar_button_bold_selector.xml
│ │ ├── format_bar_button_code_selector.xml
│ │ ├── format_bar_button_html_selector.xml
│ │ ├── format_bar_button_link_selector.xml
│ │ ├── ic_checkbox_unchecked.xml
│ │ ├── format_bar_button_quote_selector.xml
│ │ ├── format_bar_button_italic_selector.xml
│ │ ├── format_bar_button_heading_1.xml
│ │ ├── format_bar_button_heading_1_disabled.xml
│ │ ├── format_bar_button_underline_selector.xml
│ │ ├── format_bar_button_align_left_selector.xml
│ │ ├── format_bar_button_heading_1_highlighted.xml
│ │ ├── format_bar_button_align_right_selector.xml
│ │ ├── format_bar_button_underline.xml
│ │ ├── format_bar_button_align_center_selector.xml
│ │ ├── format_bar_button_html.xml
│ │ ├── format_bar_button_strikethrough_selector.xml
│ │ ├── format_bar_button_underline_disabled.xml
│ │ ├── format_bar_button_underline_highlighted.xml
│ │ ├── format_bar_button_heading_4.xml
│ │ ├── format_bar_button_html_disabled.xml
│ │ ├── format_bar_button_html_highlighted.xml
│ │ ├── ic_video_grey_c_24dp.xml
│ │ ├── format_bar_button_highlight.xml
│ │ ├── ic_checkbox_checked.xml
│ │ ├── format_bar_button_heading_4_disabled.xml
│ │ ├── format_bar_button_heading_4_highlighted.xml
│ │ ├── format_bar_button_highlight_selector.xml
│ │ ├── format_bar_button_highlight_disabled.xml
│ │ ├── format_bar_button_highlight_highlighted.xml
│ │ ├── ic_videos_grey_c_24dp.xml
│ │ ├── format_bar_button_align_left.xml
│ │ ├── ic_photos_grey_c_24dp.xml
│ │ ├── format_bar_button_align_center.xml
│ │ ├── format_bar_button_align_right.xml
│ │ ├── format_bar_button_align_left_disabled.xml
│ │ ├── format_bar_button_background_selector.xml
│ │ ├── format_bar_button_indent.xml
│ │ ├── format_bar_button_indent_disabled.xml
│ │ ├── format_bar_button_outdent.xml
│ │ ├── format_bar_button_align_center_disabled.xml
│ │ ├── format_bar_button_align_left_highlighted.xml
│ │ ├── format_bar_button_indent_highlighted.xml
│ │ ├── format_bar_button_outdent_disabled.xml
│ │ ├── format_bar_button_outdent_highlighted.xml
│ │ ├── format_bar_button_align_center_highlighted.xml
│ │ ├── format_bar_button_align_right_disabled.xml
│ │ ├── format_bar_button_align_right_highlighted.xml
│ │ ├── format_bar_button_ellipsis_horizontal.xml
│ │ ├── ic_library_grey_c_24dp.xml
│ │ ├── format_bar_button_ellipsis_horizontal_disabled.xml
│ │ ├── format_bar_button_ellipsis_vertical.xml
│ │ ├── format_bar_button_ellipsis_vertical_disabled.xml
│ │ ├── format_bar_button_code.xml
│ │ ├── format_bar_button_background.xml
│ │ ├── format_bar_button_code_disabled.xml
│ │ ├── format_bar_button_code_highlighted.xml
│ │ ├── format_bar_button_media_expanded.xml
│ │ ├── format_bar_button_media_expanded_disabled.xml
│ │ ├── format_bar_button_tasklist.xml
│ │ ├── format_bar_button_background_disabled.xml
│ │ ├── format_bar_button_background_highlighted.xml
│ │ ├── format_bar_button_media_collapsed.xml
│ │ ├── format_bar_button_media_expanded_highlighted.xml
│ │ ├── format_bar_button_tasklist_disabled.xml
│ │ ├── format_bar_button_tasklist_highlighted.xml
│ │ ├── format_bar_button_ul.xml
│ │ ├── format_bar_button_ul_disabled.xml
│ │ ├── format_bar_button_ul_highlighted.xml
│ │ ├── format_bar_button_link.xml
│ │ ├── format_bar_button_media_collapsed_disabled.xml
│ │ ├── format_bar_button_bold.xml
│ │ ├── format_bar_button_media_collapsed_highlighted.xml
│ │ ├── format_bar_button_link_disabled.xml
│ │ ├── format_bar_button_link_highlighted.xml
│ │ ├── format_bar_button_bold_disabled.xml
│ │ ├── format_bar_button_pre.xml
│ │ ├── format_bar_button_bold_highlighted.xml
│ │ ├── format_bar_button_pre_disabled.xml
│ │ ├── format_bar_button_pre_highlighted.xml
│ │ ├── ic_camera_grey_c_24dp.xml
│ │ ├── format_bar_button_heading_2.xml
│ │ ├── format_bar_button_heading_5.xml
│ │ ├── format_bar_button_heading_2_disabled.xml
│ │ └── format_bar_button_heading_2_highlighted.xml
│ │ ├── anim
│ │ ├── interpolator_overshoot.xml
│ │ ├── spin_left_45.xml
│ │ ├── spin_right_45.xml
│ │ ├── spin_left_90.xml
│ │ ├── spin_right_90.xml
│ │ ├── translate_out_end.xml
│ │ ├── translate_in_start.xml
│ │ ├── translate_in_end.xml
│ │ └── translate_out_start.xml
│ │ ├── layout
│ │ ├── format_bar_button_indent.xml
│ │ ├── format_bar_button_bold.xml
│ │ ├── format_bar_button_code.xml
│ │ ├── format_bar_button_html.xml
│ │ ├── format_bar_button_link.xml
│ │ ├── format_bar_button_list.xml
│ │ ├── format_bar_button_outdent.xml
│ │ ├── format_bar_button_pre.xml
│ │ ├── format_bar_button_list_task.xml
│ │ ├── format_bar_button_quote.xml
│ │ ├── format_bar_button_heading.xml
│ │ ├── format_bar_button_italic.xml
│ │ ├── format_bar_button_highlight.xml
│ │ ├── format_bar_button_list_ordered.xml
│ │ ├── format_bar_button_underline.xml
│ │ ├── format_bar_button_align_left.xml
│ │ ├── format_bar_button_list_unordered.xml
│ │ ├── format_bar_button_strikethrough.xml
│ │ ├── format_bar_button_align_center.xml
│ │ ├── format_bar_button_align_right.xml
│ │ ├── format_bar_plugins_container.xml
│ │ ├── format_bar_button_horizontal_line.xml
│ │ ├── format_bar_vertical_divider.xml
│ │ ├── background_color_button.xml
│ │ └── dialog_block_editor.xml
│ │ └── menu
│ │ └── list.xml
└── proguard-rules.pro
├── app
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── drawable
│ │ │ │ ├── aztec.png
│ │ │ │ ├── ic_action_redo_selector.xml
│ │ │ │ ├── ic_action_undo_selector.xml
│ │ │ │ ├── media_bar_button_camera_selector.xml
│ │ │ │ ├── media_bar_button_image_multiple_selector.xml
│ │ │ │ ├── ic_action_redo_white_24dp.xml
│ │ │ │ ├── ic_action_redo_white_30_24dp.xml
│ │ │ │ ├── ic_action_undo_white_24dp.xml
│ │ │ │ ├── ic_action_undo_white_30_24dp.xml
│ │ │ │ ├── media_bar_button_camera.xml
│ │ │ │ ├── media_bar_button_image_multiple.xml
│ │ │ │ ├── media_bar_button_camera_disabled.xml
│ │ │ │ ├── media_bar_button_camera_highlighted.xml
│ │ │ │ ├── media_bar_button_image_multiple_disabled.xml
│ │ │ │ └── media_bar_button_image_multiple_highlighted.xml
│ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── values-w1280dp
│ │ │ │ └── dimens.xml
│ │ │ ├── values
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── colors.xml
│ │ │ │ ├── styles.xml
│ │ │ │ └── strings.xml
│ │ │ ├── xml
│ │ │ │ └── provider_paths.xml
│ │ │ ├── menu
│ │ │ │ ├── menu_camera.xml
│ │ │ │ ├── menu_gallery.xml
│ │ │ │ └── menu_main.xml
│ │ │ └── layout
│ │ │ │ ├── media_toobar_camera_button.xml
│ │ │ │ ├── media_toobar_gallery_button.xml
│ │ │ │ └── test_layout.xml
│ │ └── kotlin
│ │ │ └── org
│ │ │ └── wordpress
│ │ │ └── aztec
│ │ │ └── demo
│ │ │ └── MediaToolbarAction.kt
│ └── androidTest
│ │ └── kotlin
│ │ └── org
│ │ └── wordpress
│ │ └── aztec
│ │ └── demo
│ │ ├── BaseTest.kt
│ │ ├── BaseHistoryTest.kt
│ │ └── tests
│ │ └── BasicTextEditingTests.kt
└── proguard-rules.pro
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .buildkite
├── commands
│ ├── unit-test.sh
│ ├── lint.sh
│ ├── publish-aztec.sh
│ ├── publish-glide-loader.sh
│ ├── publish-picasso-loader.sh
│ ├── publish-media-placeholders.sh
│ ├── publish-wordpress-comments.sh
│ ├── publish-wordpress-shortcodes.sh
│ └── connected-tests.sh
├── shared-pipeline-vars
└── schedules
│ └── dependency-analysis.yml
├── .configure-files
└── firebase.secrets.json.enc
├── .github
├── ISSUE_TEMPLATE.md
├── workflows
│ └── gradle-wrapper-validation.yml
└── PULL_REQUEST_TEMPLATE.md
└── .configure
/.java-version:
--------------------------------------------------------------------------------
1 | 17.0
2 |
--------------------------------------------------------------------------------
/glide-loader/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/media-placeholders/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/picasso-loader/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/wordpress-comments/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/wordpress-shortcodes/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/code_editor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wordpress-mobile/AztecEditor-Android/trunk/code_editor.png
--------------------------------------------------------------------------------
/visual_editor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wordpress-mobile/AztecEditor-Android/trunk/visual_editor.png
--------------------------------------------------------------------------------
/RepoAssets/aztec.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wordpress-mobile/AztecEditor-Android/trunk/RepoAssets/aztec.png
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/MarkForReplay.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | class MarkForReplay
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/MarkForDeletion.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | class MarkForDeletion
--------------------------------------------------------------------------------
/app/src/main/res/drawable/aztec.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wordpress-mobile/AztecEditor-Android/trunk/app/src/main/res/drawable/aztec.png
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wordpress-mobile/AztecEditor-Android/trunk/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecVisualLinebreak.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | class AztecVisualLinebreak
4 |
--------------------------------------------------------------------------------
/glide-loader/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Glide Image Loader for Aztec
3 |
4 |
--------------------------------------------------------------------------------
/wordpress-shortcodes/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | WordPress Shortcodes
3 |
4 |
--------------------------------------------------------------------------------
/picasso-loader/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Picasso Image Loader for Aztec
3 |
4 |
--------------------------------------------------------------------------------
/.buildkite/commands/unit-test.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -euo pipefail
4 |
5 | echo "--- Unit Test"
6 | ./gradlew --stacktrace aztec:testRelease
7 |
8 |
--------------------------------------------------------------------------------
/.configure-files/firebase.secrets.json.enc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wordpress-mobile/AztecEditor-Android/trunk/.configure-files/firebase.secrets.json.enc
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wordpress-mobile/AztecEditor-Android/trunk/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wordpress-mobile/AztecEditor-Android/trunk/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wordpress-mobile/AztecEditor-Android/trunk/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/IAztecLineBlockSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | interface IAztecLineBlockSpan : IAztecBlockSpan
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wordpress-mobile/AztecEditor-Android/trunk/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wordpress-mobile/AztecEditor-Android/trunk/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/FullWidthImageProcessingMarker.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | class FullWidthImageProcessingMarker
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w1280dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | true
4 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/IAztecCompositeBlockSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | interface IAztecCompositeBlockSpan : IAztecBlockSpan
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | false
5 |
6 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/IAztecSurroundedWithNewlines.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | interface IAztecSurroundedWithNewlines : IAztecNestable
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/IAztecFullWidthImageSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | interface IAztecFullWidthImageSpan : IAztecSurroundedWithNewlines
--------------------------------------------------------------------------------
/aztec/src/main/res/values/integers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 100
6 |
7 |
8 |
--------------------------------------------------------------------------------
/media-placeholders/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Media Placeholders
4 |
5 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/plugins/IAztecPlugin.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.plugins
2 |
3 | /**
4 | * The base interface of all Aztec plugins.
5 | */
6 | interface IAztecPlugin
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.buildkite/commands/lint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -euo pipefail
4 |
5 | echo "--- ktlint"
6 | ./gradlew --stacktrace ktlint
7 |
8 | echo -e "\n--- lintRelease"
9 | ./gradlew --stacktrace lintRelease
10 |
--------------------------------------------------------------------------------
/wordpress-comments/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | More
3 | Page Break
4 |
5 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ### Expected
2 |
3 |
4 | ### Observed
5 |
6 |
7 | ### Reproduced
8 | 1. [STEP_1]
9 | 2. [STEP_2]
10 | 3. [STEP_3]
11 |
12 | #### Tested
13 | [DEVICE_NAME] on [OS_VERSION] with [APP_VERSION]
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/watchers/event/sequence/EventSequence.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.watchers.event.sequence
2 |
3 | open class EventSequence : ArrayList()
4 |
5 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecCursorSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | class AztecCursorSpan {
4 | companion object {
5 | val AZTEC_CURSOR_TAG = "aztec_cursor"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/provider_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/IHistoryListener.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec
2 |
3 | interface IHistoryListener {
4 | fun onRedoEnabled()
5 | fun onUndoEnabled()
6 | fun onUndo()
7 | fun onRedo()
8 | }
9 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/handlers/QuoteHandler.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.handlers
2 |
3 | import org.wordpress.aztec.spans.AztecQuoteSpan
4 |
5 | class QuoteHandler : GenericBlockHandler(AztecQuoteSpan::class.java)
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/watchers/event/text/AfterTextChangedEventData.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.watchers.event.text
2 |
3 | import android.text.Editable
4 |
5 | data class AfterTextChangedEventData(val textAfter: Editable?)
6 |
7 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/handlers/PreformatHandler.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.handlers
2 |
3 | import org.wordpress.aztec.spans.AztecPreformatSpan
4 |
5 | class PreformatHandler : GenericBlockHandler(AztecPreformatSpan::class.java)
6 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/watchers/event/IEventInjector.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.watchers.event
2 |
3 | import org.wordpress.aztec.watchers.event.text.TextWatcherEvent
4 |
5 | interface IEventInjector {
6 | fun executeEvent(data: TextWatcherEvent)
7 | }
8 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | #ff78dcfa
6 | #ff00aadc
7 | #ff0087be
8 |
9 |
10 |
--------------------------------------------------------------------------------
/wordpress-comments/src/main/java/org/wordpress/aztec/plugins/wpcomments/CommentsTextFormat.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.plugins.wpcomments
2 |
3 | import org.wordpress.aztec.ITextFormat
4 |
5 | enum class CommentsTextFormat : ITextFormat {
6 | FORMAT_PAGE,
7 | FORMAT_MORE
8 | }
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/plugins/html2visual/IHtmlPreprocessor.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.plugins.html2visual
2 |
3 | import org.wordpress.aztec.plugins.IAztecPlugin
4 |
5 | interface IHtmlPreprocessor : IAztecPlugin {
6 | fun beforeHtmlProcessed(source: String): String
7 | }
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/plugins/visual2html/IHtmlPostprocessor.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.plugins.visual2html
2 |
3 | import org.wordpress.aztec.plugins.IAztecPlugin
4 |
5 | interface IHtmlPostprocessor : IAztecPlugin {
6 | fun onHtmlProcessed(source: String): String
7 | }
--------------------------------------------------------------------------------
/.buildkite/shared-pipeline-vars:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # This file is `source`'d before calling `buildkite-agent pipeline upload`, and can be used
4 | # to set up some variables that will be interpolated in the `.yml` pipeline before uploading it.
5 |
6 | export CI_TOOLKIT="automattic/a8c-ci-toolkit#3.4.2"
7 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecRelativeSizeBigSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import org.wordpress.aztec.AztecAttributes
4 |
5 | class AztecRelativeSizeBigSpan(attributes: AztecAttributes = AztecAttributes())
6 | : AztecRelativeSizeSpan("big", 1.25f, attributes)
7 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/exceptions/DynamicLayoutGetBlockIndexOutOfBoundsException.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.exceptions
2 |
3 | import java.lang.RuntimeException
4 |
5 | class DynamicLayoutGetBlockIndexOutOfBoundsException(message: String, cause: Throwable) : RuntimeException(message, cause)
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecRelativeSizeSmallSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import org.wordpress.aztec.AztecAttributes
4 |
5 | class AztecRelativeSizeSmallSpan(attributes: AztecAttributes = AztecAttributes())
6 | : AztecRelativeSizeSpan("small", 0.8f, attributes)
7 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecTypefaceMonospaceSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import org.wordpress.aztec.AztecAttributes
4 |
5 | class AztecTypefaceMonospaceSpan(attributes: AztecAttributes = AztecAttributes())
6 | : AztecTypefaceSpan("tt", "monospace", attributes)
7 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/toolbar/ToolbarActionType.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.toolbar
2 |
3 | /**
4 | * Describes types of actions that can be performed by toolbar.
5 | */
6 | enum class ToolbarActionType {
7 | INLINE_STYLE, EXCLUSIVE_INLINE_STYLE, BLOCK_STYLE, LINE_BLOCK, OTHER
8 | }
9 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/.github/workflows/gradle-wrapper-validation.yml:
--------------------------------------------------------------------------------
1 | name: "Validate Gradle Wrapper"
2 | on: [push, pull_request]
3 |
4 | jobs:
5 | validation:
6 | name: "Validation"
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v2
10 | - uses: gradle/wrapper-validation-action@v1
11 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecStyleBoldSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.graphics.Typeface
4 | import org.wordpress.aztec.AztecAttributes
5 |
6 | class AztecStyleBoldSpan(attributes: AztecAttributes = AztecAttributes())
7 | : AztecStyleSpan(Typeface.BOLD, attributes)
8 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_highlight_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/glide-loader/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/picasso-loader/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.configure:
--------------------------------------------------------------------------------
1 | {
2 | "project_name": "aztec-android",
3 | "branch": "trunk",
4 | "pinned_hash": "f1a61c572902401898e7e1c060b86d9da7baf8fa",
5 | "files_to_copy": [
6 | {
7 | "file": "android/WPAndroid/firebase.secrets.json",
8 | "destination": ".configure-files/firebase.secrets.json"
9 | }
10 | ]
11 | }
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecStyleItalicSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.graphics.Typeface
4 | import org.wordpress.aztec.AztecAttributes
5 |
6 | class AztecStyleItalicSpan(attributes: AztecAttributes = AztecAttributes())
7 | : AztecStyleSpan(Typeface.ITALIC, attributes)
8 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/watchers/event/text/OnTextChangedEventData.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.watchers.event.text
2 |
3 | import android.text.SpannableStringBuilder
4 |
5 | data class OnTextChangedEventData(val textOn: SpannableStringBuilder?, val start: Int = 0, val before: Int = 0, val count: Int = 0)
6 |
7 |
--------------------------------------------------------------------------------
/aztec/src/main/res/anim/interpolator_overshoot.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/media-placeholders/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/plugins/html2visual/ISpanPostprocessor.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.plugins.html2visual
2 |
3 | import android.text.Spannable
4 | import org.wordpress.aztec.plugins.IAztecPlugin
5 |
6 | interface ISpanPostprocessor : IAztecPlugin {
7 | fun afterSpansProcessed(spannable: Spannable)
8 | }
9 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/watchers/event/text/BeforeTextChangedEventData.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.watchers.event.text
2 |
3 | import android.text.SpannableStringBuilder
4 |
5 | data class BeforeTextChangedEventData(val textBefore: SpannableStringBuilder?, val start: Int = 0, val count: Int = 0, val after: Int = 0)
6 |
7 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/ic_checkbox.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ### Fix
2 |
3 |
4 | ### Test
5 | 1. [STEP_1]
6 | 2. [STEP_2]
7 | 3. [STEP_3]
8 |
9 | ### Review
10 | @[USER_NAME]
11 |
12 | Make sure strings will be translated:
13 |
14 | - [ ] If there are new strings that have to be translated, I have added them to the client's `strings.xml` as a part of the integration PR.
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/background_block_editor.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/res/values/bools.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | true
6 | true
7 | true
8 |
9 |
10 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/CommentSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.text.TextPaint
4 | import android.text.style.CharacterStyle
5 |
6 | class CommentSpan(val text: String) : CharacterStyle() {
7 | var isHidden: Boolean = false
8 | override fun updateDrawState(tp: TextPaint) {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/bg_key.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
8 |
9 |
10 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/IAztecInlineSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | interface IAztecInlineSpan : IAztecSpan
4 |
5 | /**
6 | * Extend this interface if an inline span should be exclusive, meaning
7 | * only a single inline format can be applied to this span.
8 | */
9 | interface IAztecExclusiveInlineSpan : IAztecInlineSpan
10 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.buildkite/commands/publish-aztec.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -euo pipefail
4 |
5 | ./gradlew \
6 | :aztec:prepareToPublishToS3 $(prepare_to_publish_to_s3_params) \
7 | :aztec:publish
8 |
9 | # Add meta-data for the published version so we can use it in subsequent steps
10 | cat ./aztec/build/published-version.txt | buildkite-agent meta-data set "PUBLISHED_AZTEC_VERSION"
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_action_redo_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_action_undo_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/handlers/ListHandler.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.handlers
2 |
3 | import org.wordpress.aztec.spans.AztecListSpan
4 |
5 | class ListHandler : GenericBlockHandler(AztecListSpan::class.java) {
6 | override fun shouldHandle(): Boolean {
7 | return block.span.nestingLevel in (nestingLevel - 1)..(nestingLevel)
8 | }
9 | }
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecMediaClickableSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.text.style.ClickableSpan
4 | import android.view.View
5 |
6 | class AztecMediaClickableSpan(private val mediaSpan: AztecMediaSpan) : ClickableSpan() {
7 | override fun onClick(view: View) {
8 | this.mediaSpan.onClick()
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/plugins/html2visual/IHtmlTextHandler.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.plugins.html2visual
2 |
3 | import android.text.Editable
4 | import org.wordpress.aztec.plugins.IAztecPlugin
5 |
6 | interface IHtmlTextHandler : IAztecPlugin {
7 | val pattern: String
8 |
9 | fun onHtmlTextMatch(text: String, output: Editable, nestingLevel: Int): Boolean
10 | }
--------------------------------------------------------------------------------
/.buildkite/commands/publish-glide-loader.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -euo pipefail
4 |
5 | # Retrieve data from previous steps
6 | PUBLISHED_AZTEC_VERSION=$(buildkite-agent meta-data get "PUBLISHED_AZTEC_VERSION")
7 |
8 | ./gradlew \
9 | -PaztecVersion="$PUBLISHED_AZTEC_VERSION" \
10 | :glide-loader:prepareToPublishToS3 $(prepare_to_publish_to_s3_params) \
11 | :glide-loader:publish
12 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_camera.xml:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/UnknownClickableSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.text.style.ClickableSpan
4 | import android.view.View
5 |
6 | class UnknownClickableSpan(private val unknownHtmlSpan: UnknownHtmlSpan) : ClickableSpan() {
7 |
8 | override fun onClick(widget: View) {
9 | this.unknownHtmlSpan.onClick()
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/plugins/IMediaToolbarButton.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.plugins
2 |
3 | import android.view.View
4 |
5 | interface IMediaToolbarButton : IToolbarButton {
6 |
7 | fun setMediaToolbarButtonClickListener(clickListener: IMediaToolbarClickListener)
8 |
9 | interface IMediaToolbarClickListener {
10 | fun onClick(view: View)
11 | }
12 |
13 | }
--------------------------------------------------------------------------------
/.buildkite/commands/publish-picasso-loader.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -euo pipefail
4 |
5 | # Retrieve data from previous steps
6 | PUBLISHED_AZTEC_VERSION=$(buildkite-agent meta-data get "PUBLISHED_AZTEC_VERSION")
7 |
8 | ./gradlew \
9 | -PaztecVersion="$PUBLISHED_AZTEC_VERSION" \
10 | :picasso-loader:prepareToPublishToS3 $(prepare_to_publish_to_s3_params) \
11 | :picasso-loader:publish
12 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecSubscriptSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.text.style.SubscriptSpan
4 | import org.wordpress.aztec.AztecAttributes
5 |
6 | class AztecSubscriptSpan @JvmOverloads constructor(override var attributes: AztecAttributes = AztecAttributes())
7 | : SubscriptSpan(), IAztecInlineSpan {
8 | override val TAG = "sub"
9 | }
10 |
--------------------------------------------------------------------------------
/wordpress-comments/src/main/java/org/wordpress/aztec/plugins/wpcomments/handlers/GutenbergCommentHandler.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.plugins.wpcomments.handlers
2 |
3 | import org.wordpress.aztec.handlers.GenericBlockHandler
4 | import org.wordpress.aztec.plugins.wpcomments.spans.GutenbergCommentSpan
5 |
6 | class GutenbergCommentHandler : GenericBlockHandler(GutenbergCommentSpan::class.java)
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecSuperscriptSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.text.style.SuperscriptSpan
4 | import org.wordpress.aztec.AztecAttributes
5 |
6 | class AztecSuperscriptSpan @JvmOverloads constructor(override var attributes: AztecAttributes = AztecAttributes())
7 | : SuperscriptSpan(), IAztecInlineSpan {
8 | override val TAG = "sup"
9 | }
10 |
--------------------------------------------------------------------------------
/.buildkite/commands/publish-media-placeholders.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -euo pipefail
4 |
5 | # Retrieve data from previous steps
6 | PUBLISHED_AZTEC_VERSION=$(buildkite-agent meta-data get "PUBLISHED_AZTEC_VERSION")
7 |
8 | ./gradlew \
9 | -PaztecVersion="$PUBLISHED_AZTEC_VERSION" \
10 | :media-placeholders:prepareToPublishToS3 $(prepare_to_publish_to_s3_params) \
11 | :media-placeholders:publish
12 |
--------------------------------------------------------------------------------
/.buildkite/commands/publish-wordpress-comments.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -euo pipefail
4 |
5 | # Retrieve data from previous steps
6 | PUBLISHED_AZTEC_VERSION=$(buildkite-agent meta-data get "PUBLISHED_AZTEC_VERSION")
7 |
8 | ./gradlew \
9 | -PaztecVersion="$PUBLISHED_AZTEC_VERSION" \
10 | :wordpress-comments:prepareToPublishToS3 $(prepare_to_publish_to_s3_params) \
11 | :wordpress-comments:publish
12 |
--------------------------------------------------------------------------------
/.buildkite/commands/publish-wordpress-shortcodes.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -euo pipefail
4 |
5 | # Retrieve data from previous steps
6 | PUBLISHED_AZTEC_VERSION=$(buildkite-agent meta-data get "PUBLISHED_AZTEC_VERSION")
7 |
8 | ./gradlew \
9 | -PaztecVersion="$PUBLISHED_AZTEC_VERSION" \
10 | :wordpress-shortcodes:prepareToPublishToS3 $(prepare_to_publish_to_s3_params) \
11 | :wordpress-shortcodes:publish
12 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/watchers/event/buckets/Bucket.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.watchers.event.buckets
2 |
3 | import org.wordpress.aztec.watchers.event.sequence.UserOperationEvent
4 |
5 | import java.util.ArrayList
6 |
7 | /*
8 | extend from this class to construct a specific bucket
9 | */
10 | abstract class Bucket {
11 | val userOperations = ArrayList()
12 | }
13 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecRelativeSizeSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.text.style.RelativeSizeSpan
4 | import org.wordpress.aztec.AztecAttributes
5 |
6 | open class AztecRelativeSizeSpan @JvmOverloads constructor(tag: String, size: Float, override var attributes: AztecAttributes = AztecAttributes()) : RelativeSizeSpan(size), IAztecInlineSpan {
7 | override val TAG = tag
8 | }
9 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_ellipsis_vertical_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/extensions/EnumExtensions.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.extensions
2 |
3 | import android.text.Layout
4 |
5 | fun Layout.Alignment.toCssString(isRtl: Boolean): String {
6 | return when (this) {
7 | Layout.Alignment.ALIGN_NORMAL -> if (!isRtl) "left" else "right"
8 | Layout.Alignment.ALIGN_CENTER -> "center"
9 | else -> if (isRtl) "left" else "right"
10 | }
11 | }
--------------------------------------------------------------------------------
/aztec/src/main/res/anim/spin_left_45.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/aztec/src/main/res/anim/spin_right_45.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_ellipsis_horizontal_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_indent.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_bold.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_code.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_html.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_link.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_outdent.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_pre.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/AztecAttributesExtension.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec
2 |
3 | import org.xml.sax.Attributes
4 |
5 | fun Attributes.isTaskList() = this.getValue(TYPE) == TASK_LIST_TYPE
6 | fun AztecAttributes.setTaskList() {
7 | if (!this.hasAttribute(TYPE)) {
8 | this.setValue(TYPE, TASK_LIST_TYPE)
9 | }
10 | }
11 | private const val TYPE = "type"
12 | private const val TASK_LIST_TYPE = "task-list"
13 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecStrikethroughSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.text.style.StrikethroughSpan
4 | import org.wordpress.aztec.AztecAttributes
5 |
6 | class AztecStrikethroughSpan(tag: String = "s",
7 | override var attributes: AztecAttributes = AztecAttributes())
8 | : StrikethroughSpan(), IAztecInlineSpan {
9 | override val TAG = tag
10 | }
11 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/IAztecAlignmentSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.text.Layout
4 | import android.text.style.AlignmentSpan
5 |
6 | interface IAztecAlignmentSpan : AlignmentSpan {
7 |
8 | var align: Layout.Alignment?
9 |
10 | override fun getAlignment(): Layout.Alignment = align ?: Layout.Alignment.ALIGN_NORMAL
11 |
12 | fun shouldParseAlignmentToHtml(): Boolean = true
13 | }
--------------------------------------------------------------------------------
/aztec/src/main/res/anim/spin_left_90.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/aztec/src/main/res/anim/spin_right_90.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_list_task.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_quote.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/img_hr.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_heading.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_italic.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_gallery.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/ic_baseline_check_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_highlight.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_list_ordered.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_underline.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/FontSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.text.TextPaint
4 | import android.text.style.CharacterStyle
5 | import org.wordpress.aztec.AztecAttributes
6 |
7 | class FontSpan(override var attributes: AztecAttributes = AztecAttributes()) : CharacterStyle(), IAztecInlineSpan {
8 | override var TAG = "font"
9 |
10 | override fun updateDrawState(tp: TextPaint?) {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/aztec/src/main/res/anim/translate_out_end.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_align_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_list_unordered.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_strikethrough.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/res/anim/translate_in_start.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_align_center.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_align_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_plugins_container.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/aztec/src/main/res/anim/translate_in_end.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/plugins/html2visual/IHtmlTagHandler.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.plugins.html2visual
2 |
3 | import android.text.Editable
4 | import org.wordpress.aztec.plugins.IAztecPlugin
5 | import org.xml.sax.Attributes
6 |
7 | interface IHtmlTagHandler : IAztecPlugin {
8 | fun canHandleTag(tag: String): Boolean
9 | fun handleTag(opening: Boolean, tag: String, output: Editable, attributes: Attributes, nestingLevel: Int): Boolean
10 | }
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/IAztecBlockSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import org.wordpress.aztec.ITextFormat
4 |
5 | interface IAztecBlockSpan : IAztecParagraphStyle, IAztecSurroundedWithNewlines, IParagraphFlagged {
6 | /**
7 | * Marks the text format associated with the block span. This field is not mandatory as some block styles don't
8 | * have text formats.
9 | */
10 | val textFormat: ITextFormat?
11 | }
12 |
--------------------------------------------------------------------------------
/aztec/src/main/res/anim/translate_out_start.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_button_horizontal_line.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/IAztecParagraphStyle.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | /**
4 | * Marks spans that are going to be parsed with {@link org.wordpress.aztec.AztecParser#withinHtml()}
5 | * Created in order to distinguish between spans that implement ParagraphStyle for various reasons, but have separate
6 | * parsing logic, like {@link org.wordpress.aztec.spans.AztecHeadingSpan}
7 | **/
8 | interface IAztecParagraphStyle : IAztecSpan, IAztecNestable
9 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/ITextFormat.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec
2 |
3 | /**
4 | * Defines the text formatting type.
5 | *
6 | * It is used instead of an enumeration, so that additional plugins can define their own format types.
7 | * The basic format types are defined in [AztecTextFormat]. A plugin should provide its own *enum class* implementation.
8 | *
9 | * @property name the enum member name.
10 | */
11 | interface ITextFormat {
12 | val name: String
13 | }
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_ol_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_ul_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/wordpress-comments/src/main/res/layout/page_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/formatting/AztecFormatter.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.formatting
2 |
3 | import android.text.Editable
4 | import org.wordpress.aztec.AztecText
5 |
6 | abstract class AztecFormatter(val editor: AztecText) {
7 | val selectionStart: Int
8 | get() = this.editor.selectionStart
9 |
10 | val selectionEnd: Int
11 | get() = this.editor.selectionEnd
12 |
13 | val editableText: Editable
14 | get() = this.editor.editableText
15 | }
16 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/format_bar_vertical_divider.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/media_bar_button_camera_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/plugins/IOnDrawPlugin.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.plugins
2 |
3 | import android.graphics.Canvas
4 |
5 | /**
6 | * Use this plugin in order to get access to canvas during drawing cycle of AztecText
7 | */
8 | interface IOnDrawPlugin : IAztecPlugin {
9 | /**
10 | * This method is called when onDraw method of AztecText is called but before the super call.
11 | * @param canvas canvas of AztecText
12 | */
13 | fun onDraw(canvas: Canvas)
14 | }
15 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_highlight_with_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/media_toobar_camera_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecUnderlineSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.text.style.UnderlineSpan
4 | import org.wordpress.aztec.AztecAttributes
5 |
6 | class AztecUnderlineSpan(val isCssStyle: Boolean = isCssStyleByDefault, override var attributes: AztecAttributes = AztecAttributes()) : UnderlineSpan(), IAztecInlineSpan {
7 | companion object {
8 | @JvmStatic
9 | var isCssStyleByDefault = false
10 | }
11 | override val TAG = "u"
12 | }
13 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_indent_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_outdent_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/wordpress-comments/src/main/res/layout/more_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/media_toobar_gallery_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_tasklist_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/wordpress-comments/src/main/res/drawable/format_bar_button_more_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/wordpress-comments/src/main/res/drawable/format_bar_button_page_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading_1_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading_2_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading_3_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading_4_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading_5_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading_6_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_highlight_disabled_with_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
11 |
12 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/background_color_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/media_bar_button_image_multiple_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_highlight_highlighted_with_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
11 |
12 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/plugins/html2visual/IHtmlContentHandler.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.plugins.html2visual
2 |
3 | import android.text.Editable
4 |
5 | /**
6 | * An interface for HTML content processing plugins. Plugin implementing this interface will be responsible for handling
7 | * the entire content of an element, as it will not be parsed.
8 | */
9 | interface IHtmlContentHandler {
10 | fun canHandleTag(tag: String): Boolean
11 | fun handleContent(content: String, output: Editable, nestingLevel: Int)
12 | }
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_horizontal_rule.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_media_expanded_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_action_redo_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_action_redo_white_30_24dp.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_action_undo_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_media_collapsed_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_action_undo_white_30_24dp.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_horizontal_rule_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_horizontal_rule_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_horizontal_rule_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecTypefaceSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.text.style.TypefaceSpan
4 | import org.wordpress.aztec.AztecAttributes
5 |
6 | open class AztecTypefaceSpan @JvmOverloads constructor(tag: String,
7 | family: String,
8 | override var attributes: AztecAttributes = AztecAttributes())
9 | : TypefaceSpan(family), IAztecInlineSpan {
10 | override val TAG = tag
11 | }
12 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/IParagraphFlagged.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.annotation.SuppressLint
4 |
5 | @SuppressLint("NewApi")
6 | interface IParagraphFlagged {
7 | var startBeforeCollapse: Int
8 | fun clearStartBeforeCollapse() { startBeforeCollapse = -1 }
9 | fun hasCollapsed(): Boolean { return startBeforeCollapse != -1 }
10 |
11 | var endBeforeBleed: Int
12 | fun clearEndBeforeBleed() { endBeforeBleed = -1 }
13 | fun hasBled(): Boolean { return endBeforeBleed != -1 }
14 | }
15 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/IAztecSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.annotation.SuppressLint
4 |
5 | @SuppressLint("NewApi")
6 | interface IAztecSpan : IAztecAttributedSpan {
7 |
8 | val TAG: String
9 |
10 | val startTag: String
11 | get() {
12 | if (attributes.isEmpty()) {
13 | return TAG
14 | }
15 | return TAG + " " + attributes
16 | }
17 |
18 | val endTag: String
19 | get() {
20 | return TAG
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecStyleCiteSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.graphics.Typeface
4 | import org.wordpress.aztec.AztecAttributes
5 |
6 | class AztecStyleCiteSpan(attributes: AztecAttributes = AztecAttributes())
7 | : AztecStyleSpan(Typeface.ITALIC, attributes) {
8 |
9 | override val TAG by lazy {
10 | when (style) {
11 | Typeface.ITALIC -> {
12 | return@lazy "cite"
13 | }
14 | }
15 | throw IllegalArgumentException()
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecStyleStrongSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.graphics.Typeface
4 | import org.wordpress.aztec.AztecAttributes
5 |
6 | class AztecStyleStrongSpan(attributes: AztecAttributes = AztecAttributes())
7 | : AztecStyleSpan(Typeface.BOLD, attributes) {
8 |
9 | override val TAG by lazy {
10 | when (style) {
11 | Typeface.BOLD -> {
12 | return@lazy "strong"
13 | }
14 | }
15 | throw IllegalArgumentException()
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/glide-loader/src/main/java/org/wordpress/aztec/glideloader/extensions/BitmapExtension.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.glideloader.extensions
2 |
3 | import android.graphics.Bitmap
4 | import android.graphics.Bitmap.createScaledBitmap
5 |
6 | internal fun Bitmap.upscaleTo(desiredWidth: Int): Bitmap {
7 | val ratio = this.height.toFloat() / this.width.toFloat()
8 | val proportionateHeight = ratio * desiredWidth
9 | val finalHeight = Math.rint(proportionateHeight.toDouble()).toInt()
10 |
11 | return createScaledBitmap(this, desiredWidth, finalHeight, true)
12 | }
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/watchers/event/buckets/API25Bucket.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.watchers.event.buckets
2 |
3 | import org.wordpress.aztec.watchers.event.sequence.known.space.API25InWordSpaceInsertionEvent
4 |
5 | class API25Bucket : Bucket() {
6 | init {
7 | // constructor - here add all identified sequences for this bucket
8 | userOperations.add(API25InWordSpaceInsertionEvent())
9 | //mUserOperations.add(new ...);
10 | //mUserOperations.add(new ...);
11 | //mUserOperations.add(new ...);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecStyleEmphasisSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.graphics.Typeface
4 | import org.wordpress.aztec.AztecAttributes
5 |
6 | class AztecStyleEmphasisSpan(attributes: AztecAttributes = AztecAttributes())
7 | : AztecStyleSpan(Typeface.ITALIC, attributes) {
8 |
9 | override val TAG by lazy {
10 | when (style) {
11 | Typeface.ITALIC -> {
12 | return@lazy "em"
13 | }
14 | }
15 | throw IllegalArgumentException()
16 | }
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_italic.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_italic_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_italic_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/.buildkite/schedules/dependency-analysis.yml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
2 | ---
3 |
4 | # Run everything on the `android` queue
5 | agents:
6 | queue: android
7 |
8 | steps:
9 | - label: "dependency analysis"
10 | command: |
11 | echo "--- 📊 Analyzing"
12 | ./gradlew buildHealth
13 | plugins: [$CI_TOOLKIT]
14 | artifact_paths:
15 | - "build/reports/dependency-analysis/build-health-report.*"
16 | notify:
17 | - slack: "#android-core-notifs"
18 | if: build.state == "failed"
19 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_pre_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_bold_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_code_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_html_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_link_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/ic_checkbox_unchecked.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_quote_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_italic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading_1_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_underline_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_align_left_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading_1_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_align_right_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_underline.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/AlignmentRendering.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec
2 |
3 | /**
4 | * With [SPAN_LEVEL] any alignment must be specified at the span level. Importantly, this
5 | * means that the View's gravity will always be ignored in determining the rendering of
6 | * the text's alignment.
7 | *
8 | * With [VIEW_LEVEL] alignment, the rendering of alignment is determined by the View's gravity.
9 | * Note that it is not possible to update the underlying alignment using [AztecText.toggleFormatting]
10 | * when you are using [VIEW_LEVEL] alignment rendering.
11 | */
12 | enum class AlignmentRendering { SPAN_LEVEL, VIEW_LEVEL }
13 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/toolbar/IAztecToolbar.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.toolbar
2 |
3 | import android.view.KeyEvent
4 | import org.wordpress.aztec.AztecText
5 | import org.wordpress.aztec.plugins.IToolbarButton
6 | import org.wordpress.aztec.source.SourceViewEditText
7 |
8 | interface IAztecToolbar {
9 | fun onKeyUp(keyCode: Int, keyEvent: KeyEvent): Boolean
10 | fun addButton(buttonPlugin: IToolbarButton)
11 | fun setEditor(editor: AztecText?, sourceEditor: SourceViewEditText?)
12 | fun setToolbarListener(listener: IAztecToolbarClickListener)
13 | fun toggleMediaToolbar()
14 | fun toggleEditorMode()
15 | }
16 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_align_center_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_html.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_strikethrough_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_underline_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_underline_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_html_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_html_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/ic_video_grey_c_24dp.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_highlight.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
14 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/ic_checkbox_checked.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | -
14 |
15 |
16 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading_4_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading_4_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecHorizontalRuleSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.graphics.drawable.Drawable
4 | import org.wordpress.aztec.AztecAttributes
5 | import org.wordpress.aztec.AztecText
6 | import java.lang.ref.WeakReference
7 |
8 | class AztecHorizontalRuleSpan(drawable: Drawable, override var nestingLevel: Int,
9 | override var attributes: AztecAttributes = AztecAttributes(), editor: AztecText? = null) :
10 | AztecDynamicImageSpan(drawable), IAztecFullWidthImageSpan, IAztecSpan {
11 | init {
12 | textView = WeakReference(editor)
13 | }
14 |
15 | override val TAG: String = "hr"
16 | }
17 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecStyleSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.graphics.Typeface
4 | import android.text.style.StyleSpan
5 | import org.wordpress.aztec.AztecAttributes
6 |
7 | open class AztecStyleSpan(style: Int, override var attributes: AztecAttributes = AztecAttributes())
8 | : StyleSpan(style), IAztecInlineSpan {
9 | override val TAG by lazy {
10 | when (style) {
11 | Typeface.BOLD -> {
12 | return@lazy "b"
13 | }
14 | Typeface.ITALIC -> {
15 | return@lazy "i"
16 | }
17 | }
18 | throw IllegalArgumentException()
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_highlight_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/plugins/visual2html/ISpanPreprocessor.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.plugins.visual2html
2 |
3 | import android.text.SpannableStringBuilder
4 | import org.wordpress.aztec.plugins.IAztecPlugin
5 |
6 | interface ISpanPreprocessor : IAztecPlugin {
7 | /**
8 | * Called before the spannable is processed by [org.wordpress.aztec.AztecParser] during span-to-HTML parsing.
9 | *
10 | * Warning: This callback should be read-only. The content should not be modified as it can be called by
11 | * the edit history handler, which would alter the content before the actual parsing.
12 | */
13 | fun beforeSpansProcessed(spannable: SpannableStringBuilder)
14 | }
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_highlight_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_highlight_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/ic_videos_grey_c_24dp.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_align_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
17 |
18 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/ic_photos_grey_c_24dp.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_align_center.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
17 |
18 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_align_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
17 |
18 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_align_left_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
17 |
18 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_background_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_indent.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
17 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_indent_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_outdent.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
17 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/glide-loader/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\Android\SDK/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/wordpress-comments/src/main/java/org/wordpress/aztec/plugins/wpcomments/spans/GutenbergInlineCommentSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.plugins.wpcomments.spans
2 |
3 | import android.graphics.drawable.Drawable
4 | import org.wordpress.aztec.AztecText
5 | import org.wordpress.aztec.spans.AztecDynamicImageSpan
6 | import org.wordpress.aztec.spans.IAztecFullWidthImageSpan
7 | import java.lang.ref.WeakReference
8 |
9 | class GutenbergInlineCommentSpan @JvmOverloads constructor(val commentText: String, drawable: Drawable, override var nestingLevel: Int, editor: AztecText? = null) :
10 | AztecDynamicImageSpan(drawable), IAztecFullWidthImageSpan {
11 |
12 | init {
13 | textView = WeakReference(editor)
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /home/matthew/Android/Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/aztec/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /home/matthew/Android/Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_align_center_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
17 |
18 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_align_left_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
17 |
18 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_indent_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_outdent_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_outdent_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/picasso-loader/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\Android\SDK/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_align_center_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
17 |
18 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_align_right_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
17 |
18 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_align_right_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/androidTest/kotlin/org/wordpress/aztec/demo/BaseTest.kt:
--------------------------------------------------------------------------------
1 | @file:Suppress("DEPRECATION")
2 |
3 | package org.wordpress.aztec.demo
4 |
5 | import android.util.Log
6 | import androidx.test.rule.GrantPermissionRule
7 | import androidx.test.runner.AndroidJUnit4
8 | import org.junit.Rule
9 | import org.junit.runner.RunWith
10 |
11 | @RunWith(AndroidJUnit4::class)
12 | abstract class BaseTest {
13 | @Rule
14 | @JvmField
15 | val grantPermissionRule: GrantPermissionRule = GrantPermissionRule.grant(android.Manifest.permission.CAMERA,
16 | android.Manifest.permission.WRITE_EXTERNAL_STORAGE)
17 |
18 | companion object {
19 | fun label(label: String) {
20 | Log.d("BaseTest", label)
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/Constants.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec
2 |
3 | object Constants {
4 | val MAGIC_CHAR = '\uFEFF' // '*'
5 | val MAGIC_STRING = "" + MAGIC_CHAR
6 | val REPLACEMENT_MARKER_CHAR = '\u202F'
7 | val REPLACEMENT_MARKER_STRING = "" + REPLACEMENT_MARKER_CHAR
8 | val ZWJ_CHAR = '\u200B'//'§'
9 | val ZERO_WIDTH_PLACEHOLDER_CHAR = '\u200C'
10 | val ZERO_WIDTH_PLACEHOLDER_STRING = "" + ZERO_WIDTH_PLACEHOLDER_CHAR
11 | val ZWJ_STRING = "" + ZWJ_CHAR
12 | val IMG_CHAR = '\uFFFC'
13 | val IMG_STRING = "" + IMG_CHAR
14 | val NEWLINE = '\n'
15 | val NEWLINE_STRING = "" + NEWLINE
16 | val END_OF_BUFFER_MARKER = ZWJ_CHAR
17 | val END_OF_BUFFER_MARKER_STRING = "" + ZWJ_CHAR
18 | }
19 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_ellipsis_horizontal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/ic_library_grey_c_24dp.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_ellipsis_horizontal_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_ellipsis_vertical.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/wordpress-comments/src/main/res/drawable/format_bar_button_more.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_ellipsis_vertical_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/wordpress-comments/src/main/res/drawable/format_bar_button_more_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/media_bar_button_camera.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/wordpress-comments/src/main/res/drawable/format_bar_button_more_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/media_bar_button_image_multiple.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/wordpress-comments/src/main/res/drawable/format_bar_button_page.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/media_bar_button_camera_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/media_bar_button_camera_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_code.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
13 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/wordpress-comments/src/main/res/drawable/format_bar_button_page_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/media_bar_button_image_multiple_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/media_bar_button_image_multiple_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
25 |
--------------------------------------------------------------------------------
/wordpress-comments/src/main/res/drawable/format_bar_button_page_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_background.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_code_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
13 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/test_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
11 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | AztecDemo
7 | Tenochtitlan is the hint
8 | Codex is the source
9 |
10 |
11 | Undo
12 | Redo
13 |
14 |
15 | Camera and storage permissions required to access camera
16 | Storage permission required to access photos
17 | Storage permission required to access videos
18 |
19 |
20 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_code_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
13 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_media_expanded.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
12 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_media_expanded_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
12 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_tasklist.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/toolbar/IAztecToolbarClickListener.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.toolbar
2 |
3 | import org.wordpress.aztec.ITextFormat
4 |
5 | interface IAztecToolbarClickListener {
6 | fun onToolbarCollapseButtonClicked()
7 | fun onToolbarExpandButtonClicked()
8 | fun onToolbarFormatButtonClicked(format: ITextFormat, isKeyboardShortcut: Boolean)
9 | fun onToolbarHeadingButtonClicked()
10 | fun onToolbarHtmlButtonClicked()
11 | fun onToolbarListButtonClicked()
12 |
13 | /**
14 | * Called when media button in toolbar is clicked. This allows listeners to
15 | * get a chance to respond before the target view.
16 | *
17 | * @return True if the listener has consumed the event, false otherwise.
18 | */
19 | fun onToolbarMediaButtonClicked(): Boolean
20 | }
21 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_background_disabled.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/androidTest/kotlin/org/wordpress/aztec/demo/BaseHistoryTest.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.demo
2 |
3 | import androidx.test.rule.ActivityTestRule
4 | import org.junit.Before
5 | import org.junit.Rule
6 | import org.wordpress.aztec.AztecText
7 |
8 | /**
9 | * Base class for History testing.
10 | */
11 | abstract class BaseHistoryTest : BaseTest() {
12 |
13 | protected val throttleTime: Long = 1000L
14 |
15 | @Rule
16 | @JvmField
17 | var mActivityTestRule = ActivityTestRule(MainActivity::class.java)
18 |
19 | /**
20 | * Increases the history time to cover test device variability.
21 | */
22 | @Before
23 | fun init() {
24 | val aztecText = mActivityTestRule.activity.findViewById(R.id.aztec)
25 | aztecText.history.historyThrottleTime = throttleTime
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_background_highlighted.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_media_collapsed.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
14 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_media_expanded_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
12 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/.buildkite/commands/connected-tests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -euo pipefail
4 |
5 | echo "--- :closed_lock_with_key: Installing Secrets"
6 | ./gradlew applyConfiguration
7 |
8 | echo -e "\n--- :gcloud: Logging into Google Cloud"
9 | gcloud auth activate-service-account --key-file .configure-files/firebase.secrets.json
10 |
11 | echo -e "\n--- :hammer_and_wrench: Building Tests"
12 | ./gradlew --stacktrace app:assembleDebug app:assembleDebugAndroidTest
13 |
14 | echo -e "\n--- :firebase: Run Tests"
15 | gcloud firebase test android run \
16 | --project api-project-108380595987 \
17 | --type instrumentation \
18 | --app app/build/outputs/apk/debug/app-debug.apk \
19 | --test app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \
20 | --device model=Nexus5X,version=26,locale=en,orientation=portrait \
21 | --verbosity info
22 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_tasklist_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
15 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_tasklist_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_ul.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/media-placeholders/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_ul_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_ul_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/menu/list.xml:
--------------------------------------------------------------------------------
1 |
31 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecBackgroundColorSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.graphics.Color
4 | import android.text.TextPaint
5 | import android.text.style.BackgroundColorSpan
6 | import org.wordpress.aztec.AztecAttributes
7 |
8 | class AztecBackgroundColorSpan(
9 | val color: Int
10 | ) : BackgroundColorSpan(color), IAztecInlineSpan {
11 |
12 | var alpha: Int = 220
13 | var tag: String = "span"
14 | override var attributes: AztecAttributes = AztecAttributes()
15 |
16 | fun getColorHex(): String {
17 | return java.lang.String.format("#%06X", 0xFFFFFF and color)
18 | }
19 |
20 | override fun updateDrawState(textPaint: TextPaint) {
21 | textPaint.bgColor = Color.argb(alpha, Color.red(color), Color.green(color), Color.blue(color))
22 | }
23 |
24 | override val TAG = tag
25 | }
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_link.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_media_collapsed_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
15 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_bold.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_media_collapsed_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
15 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/DeleteOverrideInputConnection.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec
2 |
3 | import android.view.inputmethod.InputConnection
4 | import android.view.inputmethod.InputConnectionWrapper
5 |
6 | /**
7 | * Wrapper around proprietary Samsung InputConnection. Forwards all the calls to it, except for getExtractedText and
8 | * some custom logic in commitText
9 | */
10 | class DeleteOverrideInputConnection(
11 | inputConnection: InputConnection,
12 | private val shouldDeleteSurroundingText: (beforeLength: Int, afterLength: Int) -> Boolean
13 | ) : InputConnectionWrapper(inputConnection, true) {
14 | override fun deleteSurroundingText(beforeLength: Int, afterLength: Int): Boolean {
15 | return shouldDeleteSurroundingText(beforeLength, afterLength)
16 | && super.deleteSurroundingText(beforeLength, afterLength)
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/IAztecAttributedSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.text.Editable
4 | import org.wordpress.aztec.AztecAttributes
5 | import org.wordpress.aztec.source.CssStyleFormatter
6 |
7 | interface IAztecAttributedSpan {
8 | var attributes: AztecAttributes
9 |
10 | /**
11 | * Parses and applies the HTML 'style' attribute.
12 | * @param output An [Editable] containing an [IAztecAttributedSpan] for processing.
13 | * @param start The index where the [IAztecAttributedSpan] starts inside the [text]
14 | */
15 | fun applyInlineStyleAttributes(output: Editable, start: Int, end: Int) {
16 | val attr = this.attributes
17 | if (attr.hasAttribute(CssStyleFormatter.STYLE_ATTRIBUTE)) {
18 | CssStyleFormatter.applyInlineStyleAttributes(output, this, start, end)
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_link_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_link_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/org/wordpress/aztec/demo/MediaToolbarAction.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.demo
2 |
3 | import org.wordpress.aztec.AztecTextFormat
4 | import org.wordpress.aztec.ITextFormat
5 | import org.wordpress.aztec.toolbar.IToolbarAction
6 | import org.wordpress.aztec.toolbar.ToolbarActionType
7 |
8 | enum class MediaToolbarAction constructor(
9 | override val buttonId: Int,
10 | override val buttonDrawableRes: Int,
11 | override val actionType: ToolbarActionType,
12 | override val textFormats: Set = setOf()
13 | ) : IToolbarAction {
14 | GALLERY(R.id.media_bar_button_gallery, R.drawable.media_bar_button_image_multiple_selector, ToolbarActionType.OTHER, setOf(AztecTextFormat.FORMAT_NONE)),
15 | CAMERA(R.id.media_bar_button_camera, R.drawable.media_bar_button_camera_selector, ToolbarActionType.OTHER, setOf(AztecTextFormat.FORMAT_NONE))
16 | }
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_bold_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_pre.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
14 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/plugins/CssBackgroundColorPlugin.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.plugins
2 |
3 | import android.text.SpannableStringBuilder
4 | import org.wordpress.aztec.plugins.visual2html.ISpanPreprocessor
5 | import org.wordpress.aztec.source.CssStyleFormatter
6 | import org.wordpress.aztec.spans.AztecBackgroundColorSpan
7 |
8 | class CssBackgroundColorPlugin : ISpanPreprocessor {
9 |
10 | override fun beforeSpansProcessed(spannable: SpannableStringBuilder) {
11 | spannable.getSpans(0, spannable.length, AztecBackgroundColorSpan::class.java).forEach {
12 | if (!CssStyleFormatter.containsStyleAttribute(it.attributes, CssStyleFormatter.CSS_BACKGROUND_COLOR_ATTRIBUTE)) {
13 | CssStyleFormatter.addStyleAttribute(it.attributes, CssStyleFormatter.CSS_BACKGROUND_COLOR_ATTRIBUTE, it.getColorHex())
14 | }
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_bold_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_pre_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
14 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_pre_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
14 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/wordpress-comments/src/main/java/org/wordpress/aztec/plugins/wpcomments/spans/GutenbergCommentSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.plugins.wpcomments.spans
2 |
3 | import org.wordpress.aztec.AztecAttributes
4 | import org.wordpress.aztec.ITextFormat
5 | import org.wordpress.aztec.spans.IAztecBlockSpan
6 |
7 | class GutenbergCommentSpan(
8 | override val startTag: String,
9 | override var nestingLevel: Int,
10 | override var attributes: AztecAttributes = AztecAttributes()
11 | ) : IAztecBlockSpan {
12 | override val TAG: String = "wp:"
13 | override var startBeforeCollapse: Int = -1
14 | override var endBeforeBleed: Int = -1
15 |
16 | private var _endTag: String = super.endTag
17 | override var endTag: String
18 | get() = _endTag
19 | set(value) {
20 | _endTag = value
21 | }
22 |
23 | override val textFormat: ITextFormat? = null
24 | }
25 |
--------------------------------------------------------------------------------
/media-placeholders/src/main/java/org/wordpress/aztec/placeholders/PlaceholderBackspaceListener.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.placeholders
2 |
3 | import org.wordpress.aztec.AztecText
4 |
5 | /**
6 | * This class overrides the backspace event and stops backspace if the previous item is a placeholder span. This is
7 | * useful to show some kind of a dialog that will let the user decide if they want to really remove the placeholder.
8 | */
9 | class PlaceholderBackspaceListener(private val visualEditor: AztecText, private val predicate: (span: AztecPlaceholderSpan) -> Boolean) : AztecText.BeforeBackSpaceListener {
10 | override fun shouldOverrideBackSpace(position: Int): Boolean {
11 | val editableText = visualEditor.editableText
12 |
13 | return editableText.getSpans(position, position + 1, AztecPlaceholderSpan::class.java).any {
14 | predicate(it)
15 | }
16 | }
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/AztecPart.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016 Automattic
3 | * Copyright (C) 2015 Matthew Lee
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.wordpress.aztec
19 |
20 | class AztecPart(val start: Int, val end: Int, val attr: AztecAttributes) {
21 | val isValid: Boolean
22 | get() = start < end
23 | }
24 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/ic_camera_grey_c_24dp.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
15 |
16 |
17 |
18 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/watchers/event/buckets/API26Bucket.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.watchers.event.buckets
2 |
3 | import org.wordpress.aztec.watchers.event.sequence.known.space.API25InWordSpaceInsertionEvent
4 | import org.wordpress.aztec.watchers.event.sequence.known.space.API26PrependNewLineOnStyledSpecialTextEvent
5 | import org.wordpress.aztec.watchers.event.sequence.known.space.API26PrependNewLineOnStyledTextEvent
6 |
7 | class API26Bucket : Bucket() {
8 | init {
9 | // constructor - here add all identified sequences for this bucket
10 | userOperations.add(API25InWordSpaceInsertionEvent())
11 | userOperations.add(API26PrependNewLineOnStyledTextEvent())
12 | userOperations.add(API26PrependNewLineOnStyledSpecialTextEvent())
13 | //mUserOperations.add(new ...);
14 | //mUserOperations.add(new ...);
15 | //mUserOperations.add(new ...);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/UnknownHtmlSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.content.Context
4 | import android.text.style.ImageSpan
5 | import android.text.style.ParagraphStyle
6 |
7 | class UnknownHtmlSpan @JvmOverloads constructor(
8 | override var nestingLevel: Int,
9 | var rawHtml: StringBuilder,
10 | context: Context,
11 | drawable: Int,
12 | var onUnknownHtmlTappedListener: OnUnknownHtmlTappedListener? = null
13 | ) : ImageSpan(context, drawable), ParagraphStyle, IAztecNestable {
14 |
15 | fun onClick() {
16 | onUnknownHtmlTappedListener?.onUnknownHtmlTapped(this)
17 | }
18 |
19 | companion object {
20 | // Following tags are ignored
21 | val KNOWN_TAGS = setOf("html", "body")
22 | }
23 |
24 | interface OnUnknownHtmlTappedListener {
25 | fun onUnknownHtmlTapped(unknownHtmlSpan: UnknownHtmlSpan)
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecImageSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.spans
2 |
3 | import android.graphics.drawable.Drawable
4 | import org.wordpress.aztec.AztecAttributes
5 | import org.wordpress.aztec.AztecText
6 |
7 | class AztecImageSpan(drawable: Drawable?,
8 | override var nestingLevel: Int,
9 | attributes: AztecAttributes = AztecAttributes(),
10 | var onImageTappedListener: AztecText.OnImageTappedListener? = null,
11 | onMediaDeletedListener: AztecText.OnMediaDeletedListener? = null,
12 | editor: AztecText? = null) : IAztecFullWidthImageSpan,
13 | AztecMediaSpan(drawable, attributes, onMediaDeletedListener, editor) {
14 | override val TAG: String = "img"
15 |
16 | override fun onClick() {
17 | onImageTappedListener?.onImageTapped(attributes, getWidth(imageDrawable), getHeight(imageDrawable))
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/androidTest/kotlin/org/wordpress/aztec/demo/tests/BasicTextEditingTests.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.demo.tests
2 |
3 | import androidx.test.rule.ActivityTestRule
4 | import org.junit.Rule
5 | import org.junit.Test
6 | import org.wordpress.aztec.demo.BaseTest
7 | import org.wordpress.aztec.demo.MainActivity
8 | import org.wordpress.aztec.demo.pages.EditorPage
9 |
10 | class BasicTextEditingTests : BaseTest() {
11 |
12 | @Rule
13 | @JvmField
14 | var mActivityTestRule = ActivityTestRule(MainActivity::class.java)
15 |
16 | // Test reproducing the issue described in https://github.com/wordpress-mobile/AztecEditor-Android/issues/711
17 | @Test
18 | fun testEditOutChangesSwitch() {
19 | EditorPage()
20 | .insertText("text")
21 | .toggleHtml()
22 | .toggleHtml()
23 | .clearText()
24 | .toggleHtml()
25 | .verifyHTML("")
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/aztec/src/main/res/layout/dialog_block_editor.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/wordpress-comments/src/main/java/org/wordpress/aztec/plugins/wpcomments/spans/WordPressCommentSpan.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.plugins.wpcomments.spans
2 |
3 | import android.graphics.drawable.Drawable
4 | import org.wordpress.aztec.AztecText
5 | import org.wordpress.aztec.spans.AztecDynamicImageSpan
6 | import org.wordpress.aztec.spans.IAztecFullWidthImageSpan
7 | import java.lang.ref.WeakReference
8 |
9 | class WordPressCommentSpan @JvmOverloads constructor(val commentText: String, drawable: Drawable, override var nestingLevel: Int, editor: AztecText? = null) :
10 | AztecDynamicImageSpan(drawable), IAztecFullWidthImageSpan {
11 |
12 | init {
13 | textView = WeakReference(editor)
14 | }
15 |
16 | companion object {
17 | private val HTML_MORE: String = "more"
18 | private val HTML_PAGE: String = "nextpage"
19 | }
20 |
21 | enum class Comment constructor(val html: String) {
22 | MORE(HTML_MORE),
23 | PAGE(HTML_PAGE)
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/plugins/UrlPastePlugin.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.plugins
2 |
3 | import android.util.Patterns
4 |
5 | /**
6 | * This plugin overrides the paste logic of URLs in the AztecText. The purpose is to make sure inserted links are
7 | * treated as HTML links.
8 | */
9 | class UrlPastePlugin : IClipboardPastePlugin.ITextPastePlugin {
10 | /**
11 | * If the pasted text is a link, make sure it's wrapped with the `a` tag so that it's rendered as a link.
12 | */
13 | override fun toHtml(pastedItem: IClipboardPastePlugin.PastedItem.HtmlText, selectedText: String?): String {
14 | return if (Patterns.WEB_URL.matcher(pastedItem.text).matches()) {
15 | if (selectedText != null) {
16 | "$selectedText"
17 | } else {
18 | "${pastedItem.text}"
19 | }
20 | } else {
21 | pastedItem.text
22 | }
23 | }
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/wordpress-comments/src/main/java/org/wordpress/aztec/plugins/wpcomments/toolbar/CommentsToolbarAction.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.plugins.wpcomments.toolbar
2 |
3 | import org.wordpress.aztec.ITextFormat
4 | import org.wordpress.aztec.plugins.wpcomments.CommentsTextFormat
5 | import org.wordpress.aztec.plugins.wpcomments.R
6 | import org.wordpress.aztec.toolbar.IToolbarAction
7 | import org.wordpress.aztec.toolbar.ToolbarActionType
8 |
9 | enum class CommentsToolbarAction constructor(
10 | override val buttonId: Int,
11 | override val buttonDrawableRes: Int,
12 | override val actionType: ToolbarActionType,
13 | override val textFormats: Set = setOf()
14 | ) : IToolbarAction {
15 | MORE(R.id.format_bar_button_more, R.drawable.format_bar_button_more_selector, ToolbarActionType.LINE_BLOCK, setOf(CommentsTextFormat.FORMAT_MORE)),
16 | PAGE(R.id.format_bar_button_page, R.drawable.format_bar_button_page_selector, ToolbarActionType.LINE_BLOCK, setOf(CommentsTextFormat.FORMAT_PAGE))
17 | }
18 |
--------------------------------------------------------------------------------
/wordpress-comments/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\Android\SDK/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/wordpress-shortcodes/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\Android\SDK/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/util/CleaningUtils.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.util
2 |
3 | import org.jsoup.Jsoup
4 | import org.jsoup.nodes.Document
5 | import org.jsoup.nodes.Element
6 | import org.jsoup.parser.Parser
7 |
8 | object CleaningUtils {
9 |
10 | @JvmStatic
11 | fun cleanNestedBoldTags(doc: Document) {
12 | // clean all nested tags that don't contain anything
13 | doc.select("b > b")
14 | .filter { element: Element -> !element.hasText() }
15 | .forEach { it.remove() }
16 |
17 | // unwrap text in between nested tags that have some text in them
18 | doc.select("b > b")
19 | .filter { element: Element -> element.hasText() }
20 | .forEach { it.unwrap() }
21 | }
22 |
23 | @JvmStatic
24 | fun cleanNestedBoldTags(html: String) : String {
25 | val doc = Jsoup.parse(html, "", Parser.xmlParser()).outputSettings(Document.OutputSettings().prettyPrint(false))
26 | cleanNestedBoldTags(doc)
27 | return doc.html()
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/aztec/src/main/kotlin/org/wordpress/aztec/plugins/html2visual/IHtmlCommentHandler.kt:
--------------------------------------------------------------------------------
1 | package org.wordpress.aztec.plugins.html2visual
2 |
3 | import android.annotation.SuppressLint
4 | import android.text.Editable
5 |
6 | /**
7 | * An interface for HTML comment processing plugins.
8 | */
9 | @SuppressLint("NewApi")
10 | interface IHtmlCommentHandler {
11 | /**
12 | * A plugin handler used by [org.wordpress.aztec.Html] parser during HTML-to-span parsing.
13 | *
14 | * This method is called when a comment is encountered in HTML.
15 | *
16 | * @param text the content/text of the comment.
17 | * @param output the parsed output [Editable], used for span manipulation.
18 | * @param nestingLevel the nesting level within the HTML DOM tree.
19 | *
20 | * @return true if this plugin handled the comment and no other handler should be called, false otherwise.
21 | */
22 | fun handleComment(text: String, output: Editable, nestingLevel: Int, updateNesting: (Int) -> Unit): Boolean {
23 | return true
24 | }
25 | }
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading_5.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading_2_disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/aztec/src/main/res/drawable/format_bar_button_heading_2_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------