-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[codex] Add Android mobile support #3579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
42f695c
253da1e
f875c7d
6c37ea1
2ae9365
2b34778
f9cf148
9f2843b
dd35910
bdae991
9af8867
10e662d
e7a3d08
86c45a4
759ce44
f21e32b
f758fd6
b6ac02c
ce29994
901dd13
4f5617d
e119c7f
98337c0
1c36b5b
480f60d
7ea930f
baf7cbe
f38d3f1
04bc32c
a17bf3d
3f3f41f
8ed80f8
f35dccd
ed1e47f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "expo": {} | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| apply plugin: 'com.android.library' | ||
| apply plugin: 'org.jetbrains.kotlin.android' | ||
|
|
||
| group = 'com.t3tools.composereditor' | ||
| version = '0.0.0' | ||
|
|
||
| android { | ||
| namespace 'expo.modules.t3composereditor' | ||
| compileSdk rootProject.ext.compileSdkVersion | ||
|
|
||
| defaultConfig { | ||
| minSdkVersion rootProject.ext.minSdkVersion | ||
| targetSdkVersion rootProject.ext.targetSdkVersion | ||
| } | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation project(':expo-modules-core') | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" /> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| package expo.modules.t3composereditor | ||
|
|
||
| import expo.modules.kotlin.modules.Module | ||
| import expo.modules.kotlin.modules.ModuleDefinition | ||
|
|
||
| class T3ComposerEditorModule : Module() { | ||
| override fun definition() = ModuleDefinition { | ||
| Name("T3ComposerEditor") | ||
|
|
||
| View(T3ComposerEditorView::class) { | ||
| Prop("controlledDocumentJson") { view: T3ComposerEditorView, documentJson: String -> | ||
| view.setControlledDocumentJson(documentJson) | ||
| } | ||
| Prop("themeJson") { view: T3ComposerEditorView, themeJson: String -> | ||
| view.setThemeJson(themeJson) | ||
| } | ||
| Prop("placeholder") { view: T3ComposerEditorView, placeholder: String -> | ||
| view.setPlaceholder(placeholder) | ||
| } | ||
| Prop("fontFamily") { view: T3ComposerEditorView, fontFamily: String -> | ||
| view.setFontFamily(fontFamily) | ||
| } | ||
| Prop("fontSize") { view: T3ComposerEditorView, fontSize: Double -> | ||
| view.setFontSize(fontSize.toFloat()) | ||
| } | ||
| Prop("lineHeight") { view: T3ComposerEditorView, lineHeight: Double -> | ||
| view.setLineHeight(lineHeight.toFloat()) | ||
| } | ||
| Prop("contentInsetVertical") { view: T3ComposerEditorView, contentInsetVertical: Double -> | ||
| view.setContentInsetVertical(contentInsetVertical.toInt()) | ||
| } | ||
|
|
||
| Prop("singleLineCentered") { view: T3ComposerEditorView, singleLineCentered: Boolean -> | ||
| view.setSingleLineCentered(singleLineCentered) | ||
| } | ||
| Prop("editable") { view: T3ComposerEditorView, editable: Boolean -> | ||
| view.setEditable(editable) | ||
| } | ||
| Prop("scrollEnabled") { view: T3ComposerEditorView, scrollEnabled: Boolean -> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium The Also found in 1 other location(s)
🚀 Reply "fix it for me" or copy this AI Prompt for your agent: |
||
| view.setScrollEnabled(scrollEnabled) | ||
| } | ||
| Prop("autoFocus") { view: T3ComposerEditorView, autoFocus: Boolean -> | ||
| view.setAutoFocus(autoFocus) | ||
| } | ||
| Prop("autoCorrect") { view: T3ComposerEditorView, autoCorrect: Boolean -> | ||
| view.setAutoCorrect(autoCorrect) | ||
| } | ||
| Prop("spellCheck") { view: T3ComposerEditorView, spellCheck: Boolean -> | ||
| view.setSpellCheck(spellCheck) | ||
| } | ||
|
|
||
| Events( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium The 🚀 Reply "fix it for me" or copy this AI Prompt for your agent: |
||
| "onComposerChange", | ||
| "onComposerSelectionChange", | ||
| "onComposerFocus", | ||
| "onComposerBlur", | ||
| "onComposerPasteImages", | ||
| "onComposerContentSizeChange", | ||
| ) | ||
|
|
||
| AsyncFunction("focus") { view: T3ComposerEditorView -> | ||
| view.focusEditor() | ||
| } | ||
| AsyncFunction("blur") { view: T3ComposerEditorView -> | ||
| view.blurEditor() | ||
| } | ||
| AsyncFunction("setSelection") { view: T3ComposerEditorView, start: Int, end: Int -> | ||
| view.setSelection(start, end) | ||
| } | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.