See Sapling's grammar, spelling, and autocomplete suggestions, plus AI content detection, running live in a rich text (contenteditable) editor, powered by the JavaScript SDK below.
Lets get started.
Try formatting some text with the toolbar — suggestions keep working in bold, headings and lists alike.
Drop this snippet into any page to get the same live suggestions and AI detection shown above.
<script src="https://sapling.ai/static/js/sapling-sdk-v1.1.3.min.js"></script>
<div contenteditable="true" id="editable"></div>
<button id="ai-detect-btn">Check for AI</button>
<script type="text/javascript">
// Note: Do not expose key like this in production setting!
// See https://sapling.ai/docs/sdk/JavaScript/quickstart/#fullstack-quickstart
Sapling.init({
key: "<API_KEY>",
mode: 'dev',
autocomplete: true,
});
const contentEditable = document.getElementById('editable');
Sapling.observe(contentEditable);
// AI detection: overall score plus per-sentence highlights.
document.getElementById('ai-detect-btn').addEventListener('click', () => {
Sapling.checkOnce(contentEditable, {aiDetect: true});
});
</script>