@chili-publish/publisher-interface
Advanced tools
Comparing version
{ | ||
"name": "@chili-publish/publisher-interface", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"author": "chili-publish", | ||
@@ -5,0 +5,0 @@ "description": "PublisherInterface is a class object that allows you to interact with the CHILI Publisher editorObject via postMessage without the complexity of postMessage.", |
@@ -19,5 +19,5 @@ # Publisher Interface | ||
* [Getting Started](#getting-started) - A very quick tutorial to get you started. | ||
* [Integrating Publisher](https://github.com/chili-publish/publisher-interface/wiki/Integrating-Publisher) - A much longer tutorial for those starting a new project with Publisher. | ||
* [Why I Cannot Use editorObject](https://github.com/chili-publish/publisher-interface/wiki/Why-I-Cannot-Use-editorObject) - A description of why `editorObject` can no longer be used when communicating with an `<iframe>`. | ||
* [Differences With editorObject](https://github.com/chili-publish/publisher-interface/wiki/Differences-With-editorObject) - All the differences between `PublisherInterface` and `editorObject`. | ||
* [Integrating Publisher](https://github.com/chili-publish/publisher-interface/wiki/Integrating-Publisher) - A much longer tutorial for those starting a new project with Publisher. | ||
* [Moving to Publisher Interface](https://github.com/chili-publish/publisher-interface/wiki/Moving-to-Publisher-Interface) - A guide for those who already have a project with Publisher and are now converting their current integration from `editorObject` to Publisher Interface. | ||
@@ -80,3 +80,3 @@ * [Big List of JavaScript Use Cases](https://github.com/chili-publish/publisher-interface/wiki/Big-List-of-JavaScript-Use-Cases) - A very long list of JavaScript use cases. [WIP] | ||
const iframe = document.getElementById("editor-iframe"); | ||
const interface = PublisherInterface.build(iframe).then( | ||
const publisher = PublisherInterface.build(iframe).then( | ||
PublisherInterface => PublisherInterface.alert("Hi!") | ||
@@ -101,4 +101,4 @@ ); | ||
(async () => { | ||
const interface = await PublisherInterface.build(iframe); | ||
const documentName = await interface.getObject("document.name"); | ||
const publisher = await PublisherInterface.build(iframe); | ||
const documentName = await publisher.getObject("document.name"); | ||
console.log(documentName); | ||
@@ -105,0 +105,0 @@ })(); |