To integrate N1ED with your website you have a set of API-functions that you can use to attach N1ED to the specified buttons, text inputs, forms, and detach from them.
Insert his code in the end of the
<body> of the page with the editor:
xxxxxxxx is the API key of your configuration.
If you already use CKEditor from its official CDN, simply change the URL in your
<script></script> tag to the above one.
window.N1ED global object to get access to API functions, for example:
Please also refer to the Configuring file and image uploader to integrate tools to upload and storage files on your server.
The list of API functions
Attaches N1ED to the specified element.This function determines the type of the element passed in
N1ED.attachToElement, if the specified element is a simple HTML-element (for example,
<div>) holding content as is.
el is a text input (
N1ED.attachToFormInput method is invoked instead.
Attaches N1ED to the specified
<div> element. All content (inner HTML) is passed to N1ED and is refreshed upon invoking
(el, elPlaceHolder, onAttached)
Connects N1ED to the specified text input:
The specified text input must be within a form. N1ED will attach its
onSubmit event listener to that form to update the value of the text input before sending data to the server.
That is, to use N1ED with an existing form, you only need to make this call, the rest is done by N1ED.
(elBtn, getHtmlContent, setHtmlContent)
Attaches to a button and invokes N1ED in the fullscreen mode when the button is clicked. To acquire and save content, functions specified in the parameters are used. This means you can use this API call to integrate with any source of content on the page.Parameters:
Detaches N1ED from the specified element.Parameters: