Skip to content
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

解析html数据的格式是什么样的 #138

Closed
chenggong0804 opened this issue May 4, 2020 · 2 comments
Closed

解析html数据的格式是什么样的 #138

chenggong0804 opened this issue May 4, 2020 · 2 comments

Comments

@chenggong0804
Copy link

chenggong0804 commented May 4, 2020

假设用一个span标签包裹着$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$这个公式。"<666>$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$</666>"。这样的数据对吗还是有另外的格式。求大佬指点一下(正常标签显示不出来<666>表示span标签)

@sbfkcel
Copy link
Owner

sbfkcel commented May 5, 2020

大概会是这样的,latexvalue公式即可。

<span>
  <latex value="x = {-b \pm \sqrt{b^2-4ac} \over 2a}." type="line"></latex>
</span>

@sbfkcel
Copy link
Owner

sbfkcel commented Jul 12, 2020

    let obj = app.towxml(`<latex value="${encodeURIComponent('x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}.')}" type="line"></latex>`, 'html', {
      // theme:'dark',
      events: {
        tap: e => {
          console.log('tap', e);
        },
        change: e => {
          console.log('todo', e);
        }
      }
    });

    _ts.setData({
      article: obj,
      isLoading: false
    });

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants