Awesome q2a theme

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

0 like 0 dislike
178 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 | 178 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,187 answers
0 comments
40,796 users