How to pass text to the editor pell (a very lightweight simple editor WYSIWYG)?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
88 views
There is such a very small editor https://github.com/jaredreich/pell
Documentation little Google little information. And your own skills is not enough to understand how to work with it.

On the page I set, and how to convey to him the initial text I do not understand.
There is not much code in it, look pliz.
by | 88 views

1 Answer

0 like 0 dislike
to pell.init you get attached to some item. If he put in advance the text doesn't work?

And here, see direct usage on github:
// To change the editor's content: editor.content.innerHTML = 'Initial content!'


What you need is:
pell.exec(command, value)

There the same from the manual:
// Execute a command document, see reference:
// https://developer.mozilla.org/en/docs/Web/API/Docu...
// this is just `document.execCommand(command, false, value)`
pell.exec(command, value)
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
35,405 users