Git Product home page Git Product logo

Comments (5)

Siphils avatar Siphils commented on July 20, 2024 1

谢谢啦 想请问下你现在用的什么Markdown编辑器呀

我用的是默认的编辑器 目前感觉我需要的功能不是很复杂。。。

from typecho-theme-aria.

iqiqiya avatar iqiqiya commented on July 20, 2024

页面地址77sec.cn
真的非常感谢
另,这个是我用过的最棒的主题 嘻嘻

from typecho-theme-aria.

Siphils avatar Siphils commented on July 20, 2024

我用Chrome DevTools查看了下,发现你使用了EditorMD这个插件,我想这应该是Pjax结束后未重载其相关的初始化函数导致文章没能被解析输出。
比较简易的方法是增加额外的JS并使用我提供的Aria.reloadAction这个接口去重新加载一下这个解析器。
对于你这种情况比较直接的例子:

Aria.reloadAction = function() {
    /* 下面这一段是我直接复制的你的网站里解析器相关的js */
    $(function() {
        var markdowns = document.getElementsByClassName("md_content");
        $(markdowns).each(function() {
            var markdown = $(this).children("#append-test").text();
            //$('#md_content_'+i).text('');
            var editormdView;
            editormdView = editormd.markdownToHTML($(this).attr("id"), {
                markdown: markdown,
                //+ "\r\n" + $("#append-test").text(),
                toolbarAutoFixed: false,
                htmlDecode: true,
                emoji: true,
                tex: true,
                toc: true,
                tocm: true,
                taskList: true,
                flowChart: false,
                sequenceDiagram: false,
            });
        });
        emojify.setConfig({
            img_dir: "//cdn.staticfile.org/emoji-cheat-sheet/1.0.0",
            blacklist: {
                'ids': [],
                'classes': ['no-emojify'],
                'elements': ['^script$', '^textarea$', '^pre$', '^code$']
            },
        });
        emojify.run();
    });
}

Aria.reloadAction()会在main.min.js pjax重载后调用。
但是我不太清楚这个插件的使用,修改插件配置后可能会影响这个插件输出的JS可能会影响解析的结果,所以上面只是一个比较粗糙的办法。
Aria.reloadAction = function() {//...}里面的代码还得自己具体考虑

from typecho-theme-aria.

iqiqiya avatar iqiqiya commented on July 20, 2024

谢谢啦 想请问下你现在用的什么Markdown编辑器呀

from typecho-theme-aria.

White-Clouds avatar White-Clouds commented on July 20, 2024

就不能解决一下么。。。。这个方法只能暂时解决吧。。。

from typecho-theme-aria.

Related Issues (20)

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.