Git Product home page Git Product logo

markdowneditors's Issues

关于嵌入混合app的询问

目前打算用混合模式开发博客的内容管理系统,编辑器的选用打算采用“简书”那种,选了很久觉得MarkDownEditors很不错。特意请问一下能否嵌入?大体上应该如何去做呢?

文本折行时,显示很乱

如:

- [ ] 还有条件插值用`{ ... }`, 省略号部分是普通的插值
      语句, 小括号里是条件, 当条件不成立时省略号部分直接
      就为空字符串

文件管理列表点击存在潜藏的数组越界问题

最近在移植该项目代码,移植成功后(FileListAdapter代码我没改动),发现一个数组越界报错,当我列表中存在几个文件时,第一次点击文件可以进入编辑,然后快速退出再点击另一文件时就会报该错误

12-17 12:56:50.135 31831-31831/com.zhongzilu.bit100 E/AndroidRuntime: FATAL EXCEPTION: main
                                                                      Process: com.zhongzilu.bit100, PID: 31831
                                                                      java.lang.ArrayIndexOutOfBoundsException: length=14; index=-1
                                                                          at java.util.ArrayList.get(ArrayList.java:310)
                                                                          at com.zhongzilu.bit100.view.fragment.FolderManagerFragment.onItemClick(FolderManagerFragment.java:629)
                                                                          at com.zhongzilu.bit100.view.adapter.FileListAdapter.lambda$onBindViewHolder$0(FileListAdapter.java:144)
                                                                          at com.zhongzilu.bit100.view.adapter.FileListAdapter.access$lambda$0(FileListAdapter.java:0)
                                                                          at com.zhongzilu.bit100.view.adapter.FileListAdapter$$Lambda$1.onClick(Unknown Source)

什么原因导致的我还不清楚

解决方法

将以下代码中的getAdapterPosition()方法换成getLayoutPosition()即可

if (mOnItemClickLitener != null) {
         holder.itemView.setOnClickListener(v -> {
             int pos = holder.getAdapterPosition();
             mOnItemClickLitener.onItemClick(holder.name, pos);
         });

         holder.itemView.setOnLongClickListener(v -> {
             int pos = holder.getAdapterPosition();
             mOnItemClickLitener.onItemLongClick(holder.itemView, pos);
             return !isEditMode;
         });
}

BaseWebActivity网页未打开就退出产生空指针

Activity退出导致View销毁,但ChromeClient未退出,当收到数据时调用了

        @Override
        public void onReceivedTitle(WebView view, String title) {
            super.onReceivedTitle(view, title);
            setTitle(title);
        }

其中setTitle中的mTextSwitcher已经销毁

    @Override
    public void setTitle(CharSequence title) {
        super.setTitle(title);
        mTextSwitcher.setText(title);
    }

卸载前请求备份

该软件目前急需的应该是线上同步吧,希望大家想办法同步一下dropbox或者onedrive,用了很久感觉很不错,可惜能不不足无法贡献代码

搜索只搜索当前目录,没有搜索子目录

这样搜索的意义就不大了呀。可以用递归实现子目录搜索

files = currentFolder
                    .listFiles(file -> file.getName().contains(key) &&
                            (
                                    file.getName().endsWith(".md") ||
                                            file.getName().endsWith(".markdown") ||
                                            file.getName().endsWith(".mdown")));//只显示md和文件夹

图片处理失败

if (resultCode == Activity.RESULT_OK && requestCode == SYSTEM_GALLERY) {
Uri uri = data.getData();
String[] pojo = {MediaStore.Images.Media.DATA};
Cursor cursor = this.managedQuery(uri, pojo, null, null, null);
if (cursor != null) {
// ContentResolver cr = this.getContentResolver();
int colunm_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
cursor.moveToFirst();
String path = cursor.getString(colunm_index);
//以上代码获取图片路径
Uri.fromFile(new File(path));//Uri.decode(imageUri.toString())
mEditorFragment.getPerformEditable().perform(R.id.id_shortcut_insert_photo, Uri.fromFile(new File(path)));
} else {
Toast.showShort(this, "图片处理失败");
}
}

这段代码处理有问题!cursor很多时候为空。

我想点击存在的文本进去应该显示预览状态

点击存在的文本我想进入预览状态会更好,因为,如果插入图片,在编辑状态下是无法查看图片的内容,一般点击文本先预览,然后应该有个编辑按钮可以点,
这个是我个人建议

how to convert this project as a library

Thanks a lot for making such a great app as an open-source, I have forked and compiled this app it works great, want to know how can it be converted as a lib or it will be great thing if you make gradle dependency of this great work.

Kindly consider my suggestion.

Looking for reply

Arshad Ali Soomro

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.