npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

easinote-proxy

v0.1.10-beta.0

Published

外部业务不用关心当前的页面是在 windows 客户端运行还是在 web 内嵌的 iframe 运行,直接调用此项目提供的 API,即可完成相关的功能。

Downloads

4

Readme

希沃白板前端 API proxy

外部业务不用关心当前的页面是在 windows 客户端运行还是在 web 内嵌的 iframe 运行,直接调用此项目提供的 API,即可完成相关的功能。

使用说明

在调用相关 API 之前,需要先进行初始化。

以React为例,两种方式。

  • 方式一:可以在程序的入口处初始化
import EasiNoteProxy from 'easinote-proxy';
EasiNoteProxy.init().then(()=> ReactDom.render("xxx", "xx"));
  • 方式二:在组件的生命周期中初始化
componentWillMount/ComponentDidMount(){
  await EasiNoteProxy.init()
}

API 调用方式如下,具体的 API,见下方的详细说明。

EasiNoteProxy.Proxy.XXX('xxx');

元素插件相关 API

1 插入多媒体

EasiNoteProxy.Proxy.insertMedia("{多媒体数据描述的 Json 对象}");
{
  "type": "video",
  "url": "http://vfx.mtime.cn/Video/2019/03/19/mp4/190319212559089721.mp4",
  "fileName": "测试.mp4",
}

详见:http://open.seewo.com/#/service/1847/doc/2262

2 插入web内容卡片元素

EasiNoteProxy.Proxy.insertElementByJson('WebPresentationCard2','{元素数据描述的 Json 对象}');

详见:http://open.seewo.com/#/service/1847/doc/2263

3 插入图片可折叠卡片元素

EasiNoteProxy.Proxy.insertElementByJson('ImageFoldCard','{元素数据描述的 Json 对象}');

详见:http://open.seewo.com/#/service/1847/doc/2264

4 同步调用客户端方法

方法名:invokeAsync 参数:params: obj

params 是一个对象,对象包含的字段如下:
name: string 需要调用的客户端方法 args: Array 客户端该方法需要的参数

例子

// 调用OpenHyperlink(客户端中打开外链)
import EasiNoteProxy from 'easinote-proxy';
EasiNoteProxy.Proxy.invokeAsync({
  name: 'OpenHyperlink',
  args: ['https://baidu.com']
})

如果需要拿返回值

// 调用GetUserAgent(获取客户端信息)
import EasiNoteProxy from 'easinote-proxy';
const userAgent = await EasiNoteProxy.Proxy.invokeAsync({
  name: 'GetUserAgent'
})

建立子页面(iframe)与父页面的通信关系

三方资源 web 页场景

详见:http://open.seewo.com/#/service/1847/doc/2257