You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ingro, I solved this problem by adding return editor in init function ( pell.js file ).
then you can play around with editor-content in the way you want. (retrieve content to store in db or load DOM string to replace an old value).
Example 1:
<script> var test; test = window.pell.init({ /* actions: [ 'bold', { name: 'italic', icon: '☺', title: 'Zitalic' }, 'underline' ], classes: { actionbar: 'pell-actionbar', button: 'pell-button', editor: 'pell-editor' }, */ onChange: html => { document.getElementById('text-output').innerHTML = html document.getElementById('html-output').textContent = html console.log(test.innerHTML) }, root: 'pell' }) </script>
If you don't want to touch/change the original code then you could try access Pell's root div by id and extract innerHTML from this element <div contenteditable="true" class="pell-editor"></div> .
Maybe I'm missing something but how can I show pre-existing content inside an editor istance?
The text was updated successfully, but these errors were encountered: