Giter VIP home page Giter VIP logo

kodeeditor's Introduction

GitHub Streak

GitHub stats

Top Langs

kodeeditor's People

Contributors

dependabot[bot] avatar markusressel avatar nathanfallet avatar ubadahj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

kodeeditor's Issues

Minimap positioning gravity

Is your feature request related to a problem? Please describe.
Sometimes the minimap can get in the way of the editor content, due to its size and static positioning.

Describe the solution you'd like
Provide a gravity setting (left, top, right, bottom), that allows a user to position the minimap along the editor view border.

Describe alternatives you've considered
Provide an api to set the specific location and dimensions of the minimap.

Keep linenumbers on screen

Is your feature request related to a problem? Please describe.
Currently line numbers (if enabled) pan and zoom off the screen.

Describe the solution you'd like
The line numbers scale and move up/down in sync with the actual text editor but always stay pinned to the left/right of the editor.

Describe alternatives you've considered
None

Additional context
None

java.lang.IllegalArgumentException: Cannot round NaN value.

10-06 09:17:17.796 29733-29733/com.apkzube.learnpythonpro E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.apkzube.learnpythonpro, PID: 29733
java.lang.IllegalArgumentException: Cannot round NaN value.
at kotlin.math.MathKt__MathJVMKt.roundToInt(MathJVM.kt:1132)
at de.markusressel.kodeeditor.library.view.CodeEditorLayout$updateLineNumbers$1.run(CodeEditorLayout.kt:477)
at android.os.Handler.handleCallback(Handler.java:742)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5603)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:774)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:652)

Follow cursor movement

Is your feature request related to a problem? Please describe.
When editing a document the cursor can go offscreen.

Describe the solution you'd like
The view should follow the cursor maintaining the current zoom level.

Minimap overview

Is your feature request related to a problem? Please describe.
When editing a very large document and/or zoomed in far it can be hard to tell where exactly you are in the document.

Describe the solution you'd like
An optional minimap of the whole document with an indication of what part of the document is currently visible.

Describe alternatives you've considered
None.

Additional context
Something like seen here:

Remove RxJava dependency

RxJava is very useful but seems to be unnecessarily complex for this library and may even cause compatibility issues. To remedy this all code that uses RxJava methods shall be replaced by custom implementations with a much smaller footprint.

EDIT:
Kotlin Flow seems like a very reasonable choice for this.

Failed to resolve: com.github.markusressel.KodeEditor:v3.0.2

Describe the bug
Hi, I was trying to use this module (KodeEditor) By following the instructions written in the README.md file.
When i was syncing build.gradle, an error occurred :
Failed to resolve: com.github.markusressel.KodeEditor:v3.0.2: Affected Modules: app

To Reproduce
Steps to reproduce the behavior:

  1. Adding maven { url "https://jitpack.io" } into build.gradle (Project)
  2. Adding def codeEditorVersion = "v3.0.2" implementation("com.github.markusressel.KodeEditor:${codeEditorVersion}") to the build.gradle (Module: App)
  3. Sync gradle
  4. See error

Expected behavior
Gradle synced successfully

Screenshots
Screenshot from 2020-08-03 21-01-41

Smartphone (please complete the following information):

  • minSdk 21
  • targetSdk 30
  • buildToolsVersion 30.0.1

Text color for editor background in CodeEditorLayout

How to change the text color for the background text in the CodeEditorLayout?

By default, it's black in color.
I have tried android:textColor="@color/white" but its not working.

Maybe something like app:ke_editor_textColor similar to app:ke_lineNumbers_textColor can help in this.

CodeEditorView.text returns "null" when called too early

Describe the bug
CodeEditorView.text returns a "null" string instead of an actual null value or an empty string when asked too early.

This is because of the way the current text is retrieved in this lines:

var text: String
  get() = codeEditText.text.toString()

where text is an Editable that may be null and the toString() is the kotlin extension function that can handle null values which in this case is not desirable.

To Reproduce
Steps to reproduce the behavior:
Call codeEditorView.text before a text has been set either by code or layout phase (I an empty string will have been set automatically by the time the view is rendered).

Expected behavior
return an empty string or an actual null value.
Imo the null value doesn't add any useful information to the method so I think just returning an empty string and in doing so keeping the non-nullability of the property is better.

Gradle sync error. Failed to resolve com.github.markusressel.KodeEditor.

Describe the bug
When trying to sync Gradle.
Shows this error:

ERROR: Failed to resolve: com.github.markusressel.KodeEditor:library:v2.1.1
Show in Project Structure dialog
Affected Modules: app

To Reproduce
Steps to reproduce the behavior:

  1. Add maven { url "https://jitpack.io" } to build.gradle (project)
  2. Add def codeEditorVersion = "v2.1.1" implementation("com.github.markusressel.KodeEditor:library:${codeEditorVersion}") to dependencies in build.gradle(module app)
  3. Sync Gradle
  4. See error

Expected behavior
Successfully sync Gradle and add libraries to the project.

Screenshots
image

Smartphone

  • Device: [ OPPO A3S (CPH1853) ]
  • OS: [ Android 8.1 ]

Automatic line wrapping

Is your feature request related to a problem? Please describe.
Navigating long lines can be cumbersome.

Describe the solution you'd like
Allow automatic line wrapping.
Wrapped lines should not increase line count.

Use AndroidX instead of Android Support

Describe the bug
Using Android Support views in an AndroidX app prevent the app to build (gradle errors)

To Reproduce
Steps to reproduce the behavior:

  1. Create an AndroidX app
  2. Import KodeEditor and use it somewhere
  3. Build the app
  4. See error

Screenshots
image
image

Additional context

implementation "com.android.support:appcompat-v7:$supportLibVersion"
implementation "com.android.support:support-annotations:$supportLibVersion"

Also see this question on StackOverflow explaining the problem: https://stackoverflow.com/questions/55217992/manifest-merger-failed-attribute-applicationappcomponentfactory-androidx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.