Git Product home page Git Product logo

editormd's Introduction

EditorMD

Markdown 编辑器 Editor.md for Typecho

Features

*需要在插件设置中手动启用,启用后将使用 marked.js 接管前台 Markdown 解析,但接管前台解析后,会导致与文章内容有关的插件失效。

**语法完整示例:https://pandao.github.io/editor.md/examples/full.html

Typecho 插件安装及使用

  1. 插件更新升级时,请先禁用插件后再上传
  2. 点此下载插件
  3. 将下载的文件解压,文件夹重命名为EditorMD,上传到Typechousr/plugins/目录下
  4. 登陆后台,在控制台下拉菜单中点击插件进入插件管理
  5. 找到EditorMD,点击启用
  6. 根据需要更新设置

License

Copyright © 2016 DT27
License: The MIT License.

editormd's People

Contributors

dt27 avatar i-cooltea avatar kokororin 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  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  avatar

editormd's Issues

希望编辑器的图片不要自动加a标签

今天这个编译器发现图片的会自动加上<a></a>标签,图片可以在文章打开,但是原生编辑器不会,我想知道怎么把这个去掉,像原生编译器那样。

一些细节

大部分主题都会载入jQuery,建议前台使用typeof判断一下,如果没有jQuery再载入插件的jQuery会不会更好?
另外强迫症忍不了这样的代码:(希望后台没有选择时,不要输出空的$(function(){} )

        <script type="text/javascript">
$(function() {
    });
</script>

仍然在typecho1.1使用的chrome62以及ios版chrome中无法粘贴剪贴板内容。

今天又发现这个问题了,我不知道是插件与typecho1.1不兼容还是chrome的锅。

还有我的手机ios端的chrome也是发现有这个问题?不过只是偶尔,我都是先复制到ios备忘录,在复制粘贴进来。

刚在电脑版chrome我试了下,某些应用没问题,但某些应用就不行了(例如TIM)。

另外我不知道如何把closed的issues打开,所以新开了这个,请作者大大不要介意,谢谢帮助我这个菜鸟。

咨询一下代码高亮部分

不管是在文章编辑页面还是在文章预览页面,都看不到代码块中高亮的效果

是因为组件默认不支持代码高亮吗?
还是说是我需要在 Typecho 中配置代码高亮相关的配置?

组件别的方面都用起来感觉很方便,谢谢~~~

LeX公式无法显示

在编辑界面可以看见,但是到了显示页面就变成文字了。。。
唯一从控制台里找到的错误:
editormd.min.js:3 Uncaught ReferenceError: prettyPrint is not defined
at Function.t.markdownToHTML (editormd.min.js:3)
at HTMLDivElement. ((index):312)
at Function.each (jquery.min.js:2)
at n.fn.init.each (jquery.min.js:2)
at HTMLDocument. ((index):308)
at j (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at Function.ready (jquery.min.js:2)
at HTMLDocument.J (jquery.min.js:2)

我用EditorMD遇到的显示问题

请教:
为什么当我的html文件所处的文件夹和static同级时editormd可以在页面正常显示,但当我的HTML文件夹移动到另一个和static文件夹同级的文件夹时就不能显示了呢,详细如图:

当admin和static同级时

Inked屏幕截图 2021-08-08 223207_LI
屏幕截图 2021-08-08 223329

当admin移动到templates文件夹下(templates和static同级)

Inked屏幕截图 2021-08-08 223049_LI
屏幕截图 2021-08-08 223305

数学公式问题

一图是后台编辑和预览,正确的没毛病
但是发布出来之后就是二图那样失效了
很难受
1
2

英文逗号解析bug

bug 简介

  1. 英文逗号解析成了中文逗号
  2. 引号嵌套不忍直视

测试代码

'She said, "Yes, I do" '
"She said, 'Yes, I do'"
'She said'
"She said"

解析后的内容

<div class="markdown-body editormd-preview-container" previewcontainer="true" style="padding: 20px;"><p>‘She said, “Yes, I do” ‘<br>“She said, ‘Yes, I do’”<br>‘She said’<br>“She said”
</p></div>

展示效果

image

无法开启插件

报错信息: Server Error
环境: Nginx 1.9.12 (Windows Version), PHP7.0.4

Chrome浏览器下无法使用任何按钮

环境简介:
使用nginx搭建的typecho最新版。EditorMD使用的是Readme里面的安装方式,并在plugin文件夹下将所有文件的所有者换成了服务器运行用户。 Chrome版本:62.0.3202.94(正式版本)
问题简述:
使用其进行编辑时发现,仅在Chrome使用默认模式打开网页时无法使用文本框上面的任何按钮。
问题自我检查:
自我检查后发现如下情况:
1.使用F12进入调试模式后切换成iPhone与iPad布局皆可以使用按钮,但是关掉调试模式的话单单使用UA模拟无法使用按钮。
2.使用其他浏览器可以正常使用按钮(IE、Edge)。
3.FireFox和Chrome症状基本相同。
这个有什么解决方法吗?如果需要提供别的什么信息,欢迎与我沟通~_~

表格bug

你好,在表格中|的转义貌似是无效的

编辑器无法粘贴剪贴板内容?版本1.21

使用编辑器时候剪贴板内容无法粘贴上去。
但是用官方的可以粘贴。
而且去除文字的格式后就可以粘贴(例如使用记事本粘贴进去再复制出来)却可以。
能帮我解决问题吗?

请帮助我,谢谢。

有些latex公式无法正常显示

有些latex公式例如
$$
\min _ { G } \max _ { D } V ( D , G ) = \mathbb { E } _ { \boldsymbol { x } \sim p _ { \mathrm { data } } ( \boldsymbol { x } ) } [ \log D ( \boldsymbol { x } ) ] + \mathbb { E } _ { \boldsymbol { z } \sim p _ { \boldsymbol { z } } ( z ) } [ \log ( 1 - D ( G ( \boldsymbol { z } ) ) ) ]
$$
按照教程的格式写也无法正常显示

编辑器布局问题

在非全屏模式下,编辑器会这样显示:

image

在全屏模式下,编辑器则会这样显示:

image

难以使用。

屏幕是缩放1.25倍的1920x1080高分屏,Firefox Quantom 58,Fedora 64位。

博客主页的表格显示错位,在编辑器里正常的

  • 启用的插件
    • qq 20160826151948
    • qq 20160826152805
  • Typecho版本为官网的最新开发版,主题为默认主题.
    • qq 20160826152850
  • 编辑器界面:
    qq 20160826151611
  • 页面显示:
    qq 20160826151726
  • 页面地址
    http://code.pcwuyu.com/2016/64.html
  • 代码
    • markdown版
|  色块  | 详细  |
| ------------ | ------------ |
| <div style="width:100px;height:75px;background-color:#3cba54;">  | <strong>Google Green</strong><br>Hex: #3cba54<br>RGB: 60, 186, 84  |
| <div style="width:100px;height:75px;background-color:#f4c20d;">  | <strong>Google Yellow</strong><br>Hex: #f4c20d<br>RGB: 244, 194,13 |
| <div style="width:100px;height:75px;background-color:#db3236;">  | <strong>Google Red</strong><br>Hex: #db3236<br>RGB: 219, 50, 54  |
| <div style="width:100px;height:75px;background-color:#4885ed;">  | <strong>Google Blue</strong><br>Hex: #4885ed<br>RGB: 72, 133,237 |
  • html版
<table style="border:0;width:100%;">
    <tbody>
    <tr>
        <td style="width:100px;max-width:100px;vertical-align:top">
            <div style="width:100px;height:75px;background-color:#3cba54;"><span style="display: none;">#3cba54</span>
            </div>
        </td>
        <td style="text-align:left;vertical-align:top;"><strong>Google Green</strong><br>Hex: #3cba54<br>RGB: 60, 186,
            84<p></p></td>
    </tr>
    <tr>
        <td style="width:100px;max-width:100px;vertical-align:top">
            <div style="width:100px;height:75px;background-color:#f4c20d;"><span style="display: none;">#f4c20d</span>
            </div>
        </td>
        <td style="text-align:left;vertical-align:top;"><strong>Google Yellow</strong><br>Hex: #f4c20d<br>RGB: 244, 194,
            13<p></p></td>
    </tr>
    <tr>
        <td style="width:100px;max-width:100px;vertical-align:top">
            <div style="width:100px;height:75px;background-color:#db3236;"><span style="display: none;">#db3236</span>
            </div>
        </td>
        <td style="text-align:left;vertical-align:top;"><strong>Google Red</strong><br>Hex: #db3236<br>RGB: 219, 50, 54
            <p></p></td>
    </tr>
    <tr>
        <td style="width:100px;max-width:100px;vertical-align:top">
            <div style="width:100px;height:75px;background-color:#4885ed;"><span style="display: none;">#4885ed</span>
            </div>
        </td>
        <td style="text-align:left;vertical-align:top;"><strong>Google Blue</strong><br>Hex: #4885ed<br>RGB: 72, 133,
            237<p></p></td>
    </tr>
    </tbody>
</table>

关于前端呈现。

  1. 代码块多语言风格,编辑器有效果,前端没有效果。
    2.那个image加载中的gif,每篇文章都有,很难看,我直接删掉了。

总体很好,辛苦,多谢。

启用插件后导致原有的 highlight.js 失效

在 Typecho 1.1 (17.10.30) 环境下,启用 EditorMD 插件后会导致 highlight.js 失效。

highlight.js 在 header.phpfooter.php 两个地方插入有代码(一行 link 标签引入 CSS 样式,一行 scrpit 标签引入 JavaScript 格式化代码),不知道是哪里冲突了。

标题id渲染bug

纯中文可以渲染出id,中英文混合就不行了
中文会被替换为-

粘贴上传问题

之前用本Editor的时候,支持粘贴上传。
这是最喜欢typecho的地方了,因为他有一个这么棒的编辑器。

但是重装本编辑器发现不可以粘贴上传了,请问是什么情况呢?

typecho 1.0正式版
浏览器: chrome

移动端输入bug

锤子手机上每输入一个字段前就会增加一个空行。

上传图片处苹果选择照片总是报错而选拍照的话正常。

给编辑器边上的附件插入功能加点代码

image
这个编辑器边上的插入图片附件是不能和你的插件兼容的,我在你的插件里加了一点代码,这样就可以用和官方一样的插入图片功能了,而且不用改typecho的代码

修改Plugin.php 加入一小段

                lang : {
                    toolbar : {
                        more : "插入摘要分隔符"
                    }
                },
            });

            $(function(){
                $("#tab-files").on("click","#file-list>li",function(){
                    var url = $(this).data("url");
                    var img = $(this).data("image");
                    if (img==1) {
                        postEditormd.insertValue("![]("+url+")");
                    } else{
                        postEditormd.insertValue(url);
                    };
                })
            });
        </script>
        <?php
    }
    /**
     * emoji 解析器
     */
    public static function footerJS($conent)

我还希望有2个功能,截图直接上传,和github一样,然后就是复制粘贴别人网站的内容,编辑器自动转换成markdown代码插入编辑器,自动识别图片并下载。

如果你有时间也希望有这2个功能希望更新插件,谢谢

请问怎么添加缩进功能

您好,请问,怎么添加首行缩进按钮
半角的空格
 或 
全角的空格
 或 
不断行的空格
 或 
谢谢!

APlayer音乐插件的问题

在插件设置里 启用后将使用 marked.js 接管前台 Markdown解析后 APlayer播放器消失。关闭就出来了
另外看到一年前的README.md发现对APlayer有兼容,现在是否有更新?
APlayer
希望可以加一个APlayer的音乐图标按钮

在文章编辑页面,点击编辑器上的音乐图标 按钮,在弹出的窗口中输入音乐地址(见支持列表),最后点击确定即可

原版编辑器可以支持这样~

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.