假设我有一个数字10000,我想将它从右到左分成 2 个字符,从而得到类似这样的数组[0] => 1,[1] => 00,[2] => 00。它以某种方式可能str_split($var, 2);吗?
我有这段代码可以从他们的网站启用 CKEditor,但我不知道如何与其交互。如何使用 javascript 或 jquery 从中获取数据?
ClassicEditor
.create(document.querySelector('#editor'))
.then(editor => {
console.log(editor);
})
.catch(error => {
console.error(error);
});Run Code Online (Sandbox Code Playgroud)
<script src="https://cdn.ckeditor.com/ckeditor5/10.0.1/classic/ckeditor.js"></script>
<textarea name="content" id="editor">
<p>Here goes the initial content of the editor.</p>
</textarea>Run Code Online (Sandbox Code Playgroud)