loadText EDITOR
¶
loadText API loads the text to any block using its path. If the block already have text it will be overwritten and if the block doesn’t exist, new block will be created with the given text.
Syntax¶
loadText(text: String, path : Array<Number>)
Example¶
1 2 3 4 5 6 7 8 9 10 | import INKAPI from './inkapi.js'
INKAPI.ready(() => {
const EDITOR = INKAPI.editor;
//Add or Overwrite the the text in block [2].
EDITOR.loadText("Some Text Here", [2]);
});
|