### BBCode Conversion Methods Usage Source: https://www.sceditor.com/documentation/formats/bbcode Example demonstrating initialization and the use of toBBCode and fromBBCode methods. ```javascript ``` -------------------------------- ### BBCode Trim Example Source: https://www.sceditor.com/documentation/options Demonstrates the effect of the bbcodeTrim option on editor content. ```text [b] example [/b] [b] example [/b] ``` ```text [b] example [/b] [b] example [/b] ``` -------------------------------- ### Style Matching Configuration Source: https://www.sceditor.com/documentation/custom-bbcodes Examples for configuring style matching within a BBCode object. ```javascript "style-name": ["value1", "value2"] ``` ```javascript "style-name": null ``` -------------------------------- ### Tag Matching Configuration Source: https://www.sceditor.com/documentation/custom-bbcodes Examples for configuring tag and attribute matching within a BBCode object. ```javascript "tag-name": null ``` ```javascript "tag-name": { "attribute-name": null, "another-attribute-name": null } ``` ```javascript "tag-name": { "attribute-name": ["value1", "value2"] } ``` -------------------------------- ### Invalid Nesting Example Source: https://www.sceditor.com/documentation/formats/bbcode Demonstration of how invalid nesting is structured before and after automatic fixing. ```text [inline]testing[block]test[/block]123[/inline] ``` ```text [inline]testing[/inline][block]test[/block][inline]123[/inline] ``` -------------------------------- ### Register a custom converter Source: https://www.sceditor.com/documentation/formats/xhtml Example of pushing a converter to the converters array to transform specific attributes into CSS. ```javascript // Push this converter onto the end of the converters array sceditor.formats.xhtml.converters.push({ tags: { // Match any tag with the attribute border '*': { border: null } }, conv: function(node) { var $node = $(node); // Change border attribute to CSS $node.css('border-size', $node.attr('border')).removeAttr('border'); } }); ``` -------------------------------- ### Define exec property Source: https://www.sceditor.com/documentation/custom-commands Examples of defining the exec property using a function or a native browser command string. ```javascript exec: function () { this.insert('[b]Hello World[/b]'); } ``` ```javascript // Bold will be passed to the native execCommand exec: 'bold' ``` -------------------------------- ### Implement custom HTML conversion function Source: https://www.sceditor.com/documentation/custom-bbcodes Example of a function used to convert BBCode tokens and attributes into HTML output. ```javascript html: function(token, attrs, content) { if(typeof attrs.defaultattr !== 'undefined') content = '' + attrs.defaultattr + '' + content; return '
' + content + '
'; } ``` -------------------------------- ### Implement custom BBCode format function Source: https://www.sceditor.com/documentation/custom-bbcodes Example of a function used to convert an HTMLElement into a custom BBCode string. ```javascript function(element, content) { if(!element.attr('data-youtube-id')) return content; return '[youtube]' + element.attr('data-youtube-id') + '[/youtube]'; } ``` -------------------------------- ### Conditional Formatting Logic Source: https://www.sceditor.com/documentation/custom-bbcodes Example of a format function that checks for specific styles before applying BBCode tags. ```javascript format: function(element, content) { // Only handle tags with the font-weight: bold style if(element.style.fontWeight !== 'bold') { return content; } return '[b]' + content + '[/b]'; } ``` -------------------------------- ### Define txtExec property Source: https://www.sceditor.com/documentation/custom-commands Examples of defining the txtExec property using a function or a string array for text wrapping. ```javascript txtExec: function () { this.insert('[b]Hello World[/b]'); } ``` ```javascript txtExec: ['[b]', '[/b]'] ``` -------------------------------- ### Define allowed children for BBCode Source: https://www.sceditor.com/documentation/custom-bbcodes Examples of restricting child elements within a BBCode tag using the allowedChildren property. ```javascript allowedChildren: ['#'] ``` ```javascript allowedChildren: ['b', 'i'] ``` -------------------------------- ### Initialize SCEditor with Options Source: https://www.sceditor.com/documentation/options Pass configuration options as an object to the sceditor.create method during initialization. ```javascript // Create the editor sceditor.create(textarea, { // Options go here plugins: 'undo', format: 'bbcode', toolbar: 'bold,italic,underline|source', locale: 'no-NB' }); ``` -------------------------------- ### Initialize AutoYoutube plugin Source: https://www.sceditor.com/documentation/plugins/autoyoutube Enable the plugin by adding 'autoyoutube' to the plugins option during editor creation. ```html ``` -------------------------------- ### Initialize EmojiMart Integration Source: https://www.sceditor.com/documentation/plugins/emojis Configure the editor to use the EmojiMart picker instead of a manual list. ```javascript ``` ```html ``` -------------------------------- ### sceditor.create(textarea, options) Source: https://www.sceditor.com/documentation/options Initializes the SCEditor on a given textarea element with the provided configuration options. ```APIDOC ## sceditor.create(textarea, options) ### Description Initializes the SCEditor on a specified textarea element using an options object. ### Parameters - **textarea** (Element) - The textarea element to replace with the editor. - **options** (Object) - Configuration object containing editor settings. ### Options - **toolbar** (String) - Comma separated list of commands. Use '|' to group commands. - **toolbarExclude** (String) - Comma separated list of commands to exclude. - **style** (String) - URL of the stylesheet for the editor content. - **fonts** (String) - Comma separated list of fonts for the font selector. - **colors** (String) - Comma separated list of hex colors with '|' for new columns. - **locale** (String) - The locale code (e.g., 'en', 'fr'). - **charset** (String) - Charset for the WYSIWYG content. - **startInSourceMode** (Bool) - Whether to start in source mode. - **emoticonsEnabled** (Bool) - Whether emoticons are enabled. - **emoticonsCompat** (Bool) - Enables compatibility mode for emoticons. - **emoticonsRoot** (String) - Root URL for emoticon images. - **emoticons** (Object) - Object defining dropdown, more, and hidden emoticons. - **icons** (String) - Icon set to use (e.g., 'monocons', 'material'). - **width** (String/int) - Initial width of the editor. - **height** (String/int) - Initial height of the editor. - **resizeEnabled** (Bool) - Whether the editor can be resized. ``` -------------------------------- ### Enable BBCode Format Source: https://www.sceditor.com/documentation/formats/bbcode Set the format option to 'bbcode' during editor initialization. ```javascript ``` -------------------------------- ### Initialise XHTML Format Source: https://www.sceditor.com/documentation/formats/xhtml To enable the XHTML format, set the format option to 'xhtml' when creating the editor instance. ```APIDOC sceditor.create(textarea, { format: 'xhtml', style: 'minified/themes/content/default.min.css' }); ``` -------------------------------- ### Include Language Files Source: https://www.sceditor.com/documentation/options Load the required language file after the main editor script but before initializing the editor instance. ```html ``` -------------------------------- ### Initialize DragDrop Plugin Source: https://www.sceditor.com/documentation/plugins/dragdrop Enable the plugin by adding 'dragdrop' to the plugins option and configuring the dragdrop object. ```javascript ``` -------------------------------- ### Initialize SCEditor with BBCode Source: https://www.sceditor.com/documentation Initialize the editor on a textarea element using the BBCode format. ```javascript ``` -------------------------------- ### Initialize SCEditor with XHTML Source: https://www.sceditor.com/documentation Initialize the editor on a textarea element using the XHTML format. ```javascript ``` -------------------------------- ### Initialize Plaintext Plugin Source: https://www.sceditor.com/documentation/plugins/plaintext Enable the plaintext plugin by adding it to the plugins option during editor creation. ```html ``` -------------------------------- ### Initialize Emojis Plugin Source: https://www.sceditor.com/documentation/plugins/emojis Enable the plugin by adding 'emojis' to the plugins option and providing a list of emoticons. ```javascript ``` -------------------------------- ### Creating a Plugin Source: https://www.sceditor.com/documentation/custom-plugins Plugins are defined by adding a function to the sceditor.plugins object before the editor instance is created. ```APIDOC ## Creating a Plugin ### Description Define a new plugin by assigning a function to the `sceditor.plugins.[name]` object. This must be done before calling `sceditor.create()`. ### Example ```javascript sceditor.plugins.myplugin = function() { // Place signal handlers and functions here }; ``` ``` -------------------------------- ### Initialize Undo Plugin Source: https://www.sceditor.com/documentation/plugins/undo Enable the undo plugin by adding it to the plugins option during editor creation. ```html ``` -------------------------------- ### Style command icon Source: https://www.sceditor.com/documentation/custom-commands CSS selector pattern to assign a background image to a custom command button. ```css .sceditor-button-[name] div { background: url('/images/icon.png'); } ``` -------------------------------- ### Configure Parser Options Source: https://www.sceditor.com/documentation/formats/bbcode Pass custom settings to the parserOptions object during initialization to control block formatting. ```javascript ``` -------------------------------- ### Initialize AutoSave Plugin Source: https://www.sceditor.com/documentation/plugins/autosave Enable the plugin by adding 'autosave' to the plugins option during editor creation. ```html ``` -------------------------------- ### Define a custom format structure Source: https://www.sceditor.com/documentation/custom-formats Register a new format by assigning a constructor function to sceditor.formats. Ensure this is executed before calling sceditor.create(). ```javascript sceditor.formats['youformatname'] = function () { /** * Called when the editor is created. * * This is called before the editor is fully initialised */ this.init = function () { // this is set to the editor }; /** * Called when the WYSIWYG editor document is ready */ this.onReady = function () { // this is set to the editor }; /** * Called to convert the whole HTML document to this format */ this.toSource = function (html, context) { // this is set to this object }; /** * Called to convert the whole source into HTML */ this.toHtml = function (source) { // this is set to this object }; /** * Called to convert a fragment HTML into this format * * Parent is set to the current node */ this.fragmentToSource = function (html, context, parent) { // this is set to this object }; /** * Called to convert a fragment of source into HTML */ this.fragmentToHtml = function (source) { // this is set to this object }; }; ``` -------------------------------- ### Define a custom command Source: https://www.sceditor.com/documentation/custom-commands Registers a new command with execution logic for both WYSIWYG and source modes. ```javascript sceditor.command.set('commandname', { exec: function() { // this is set to the editor instance this.insert('a'); }, txtExec: function() { // this is set to the editor instance this.insert('a'); }, tooltip: 'Insert the letter a' }); ``` -------------------------------- ### Configure AutoSave Options Source: https://www.sceditor.com/documentation/plugins/autosave Customize the plugin behavior by providing an autosave object with storageKey and handler functions. ```html ``` -------------------------------- ### Define a Custom Plugin Source: https://www.sceditor.com/documentation/custom-plugins Register a new plugin by adding it to the sceditor.plugins object before initializing the editor instance. ```javascript // Created in sceditor.plugins.[name] object sceditor.plugins.myplugin = function() { // Place signal handlers and functions here }; ``` -------------------------------- ### Set allowed tags Source: https://www.sceditor.com/documentation/formats/xhtml Define a whitelist of tags that are permitted in the output. ```javascript sceditor.formats.xhtml.allowedTags = ['a', 'strong', 'p', 'span', 'div']; ``` -------------------------------- ### Configure allowed attributes Source: https://www.sceditor.com/documentation/formats/xhtml Format for defining allowed attributes on a per-tag basis or globally using the asterisk wildcard. ```javascript sceditor.formats.xhtml.disallowedAttribs['tagname']['attributename'] = [ 'array', 'of', 'valid', 'values', 'or', 'null', 'to', 'allow', 'all', 'values' ]; ``` ```javascript sceditor.formats.xhtml.disallowedAttribs = { // The * sign matches every tags so this will allow the id // and class attributes on all tags '*': { id: null, 'class': null }, // This will allow the href attribute on the a tag a: { href: null }, // This will allow the face attribute on the font tag // with a value of 'Arial' or 'Times New Roman' font: { face: ['Arial', 'Times New Roman'] } }; ``` -------------------------------- ### DragDrop Plugin Configuration Source: https://www.sceditor.com/documentation/plugins/dragdrop Configuration options for the DragDrop plugin, including allowed file types, validation, and the file handling callback. ```APIDOC ## DragDrop Plugin Options ### Description The `dragdrop` object is passed within the SCEditor configuration to enable and customize drag and drop behavior. ### Options - **allowedTypes** (Array|null) - Optional - An array of allowed MIME types (e.g., ['image/jpeg', 'image/png']) or null to allow all types. - **isAllowed** (Function) - Optional - A function that receives a `file` object and returns a boolean indicating if the file is permitted. Defaults to always returning true. - **handlePaste** (Boolean) - Optional - Whether to extract pasted files (e.g., base64 encoded images). Defaults to true. - **handleFile** (Function) - Required - A function that handles the file upload process. It receives the `file` object and a `createPlaceholder` function. The `createPlaceholder` function returns an object with `insert(html)` and `cancel()` methods to manage the UI state during upload. ``` -------------------------------- ### Command object structure Source: https://www.sceditor.com/documentation/custom-commands The default structure of a command object definition. ```javascript { exec: undefined, errorMessage: undefined, txtExec: undefined, tooltip: undefined } ``` -------------------------------- ### Convert BBCode to HTML Source: https://www.sceditor.com/documentation/formats/bbcode Use the fromBBCode method to transform BBCode strings into HTML. ```javascript var html = instance.fromBBCode(bbcode[, asFragment]); ``` -------------------------------- ### fromBBCode(bbcode, asFragment) Source: https://www.sceditor.com/documentation/formats/bbcode Converts a string of BBCode into a string of HTML. This method is added to the editor instance when the BBCode format is enabled. ```APIDOC ### fromBBCode(bbcode, asFragment) #### Description Converts a string of BBCode into a string of HTML. Optionally returns the result as a fragment instead of wrapped in div tags. #### Syntax `var html = instance.fromBBCode(bbcode[, asFragment]);` #### Parameters - **bbcode** (String) - Required - The BBCode string to convert. - **asFragment** (Boolean) - Optional - If true, returns an HTML fragment; otherwise, wraps in div tags. Defaults to `false`. #### Return - **String** - The resulting HTML string. ``` -------------------------------- ### dropDownCss Source: https://www.sceditor.com/documentation/options Configures extra CSS to be applied to the dropdown menu. ```APIDOC ## dropDownCss ### Description Extra CSS to add to the dropdown menu (e.g. z-index). ### Type Object ### Default {} ``` -------------------------------- ### AutoSave Plugin Configuration Schema Source: https://www.sceditor.com/documentation/plugins/autosave Detailed structure for the autosave configuration object including default values and handler definitions. ```javascript autosave: { // The storage key to use for storing the draft in local storage. // Key should start with "sce-autodraft-" for the autosave plugin to // remove it if it is passed the expires. // Defaults to "sce-autodraft-" plus the path and query string: storageKey: 'sce-autodraft-' + location.pathname + location.search;, // Save handler function, see below for data object saveHandler: function (data) { ... }, // Load handler function, see below for data object loadHandler: function () { ... return data; }, // Number of milliseconds to keep drafts before clearing when using the // default load and save handlers. // Defaults to 24 hrs expires: 86400000 } ``` -------------------------------- ### sceditor.formats.bbcode.set(name, bbcode) Source: https://www.sceditor.com/documentation/custom-bbcodes Registers or updates a BBCode definition. This must be called before the editor instance is created via sceditor.create(). ```APIDOC ## sceditor.formats.bbcode.set(name, bbcode) ### Description Registers a new BBCode or updates an existing one. This function must be invoked before the editor instance is initialized. ### Parameters - **name** (String) - Required - The name of the BBCode (e.g., "b" for [b]). Must be lower-case. - **bbcode** (Object) - Required - The configuration object defining the BBCode behavior, including tags, styles, and format/html conversion logic. ``` -------------------------------- ### Configure Custom Colors Source: https://www.sceditor.com/documentation/options Define custom color palettes using hex codes, separated by commas for columns and bars for new rows. ```javascript colors: '#ffff00,#ff00ff,#00ffff|#ff0000,#00ff00,#0000ff', ``` -------------------------------- ### Include SCEditor Assets Source: https://www.sceditor.com/documentation Include the required CSS theme, editor JS, and format-specific scripts in your HTML document. ```html ``` -------------------------------- ### sceditor.formats.xhtml.allowedAttribs Source: https://www.sceditor.com/documentation/formats/xhtml A whitelist of allowed attributes. If null or empty, all attributes are allowed unless blacklisted. ```APIDOC sceditor.formats.xhtml.allowedAttribs = { '*': { id: null, 'class': null }, a: { href: null } }; ``` -------------------------------- ### Implement a Signal Handler Source: https://www.sceditor.com/documentation/custom-plugins Define functions within the plugin matching signal names to automatically handle editor events. ```javascript sceditor.plugins.myplugin = function() { base.signalKeydownEvent = function(e) { // this will automatically be called when 'myplugin' // is registered with an editor instance and there // is a keydown event }; }; ``` -------------------------------- ### sceditor.command.set(name, cmd) Source: https://www.sceditor.com/documentation/custom-commands Registers or updates a custom command in the editor. This must be called before initializing the editor instance. ```APIDOC ## sceditor.command.set(name, cmd) ### Description Registers a new command or updates an existing one. Must be called before sceditor.create(). ### Parameters - **name** (String) - Required - The name of the command (must be lower-case). - **cmd** (Object) - Required - The command configuration object. ### Command Object Structure - **exec** (String|Function) - Optional - Executed in WYSIWYG mode. - **txtExec** (String|Array|Function) - Optional - Executed in source/text mode. - **tooltip** (String) - Optional - Tooltip text for the button. - **state** (String|Function) - Optional - Determines the button state. - **errorMessage** (String) - Optional - Error message if native execCommand fails. ### Example ```javascript sceditor.command.set('commandname', { exec: function() { this.insert('a'); }, txtExec: function() { this.insert('a'); }, tooltip: 'Insert the letter a' }); ``` ``` -------------------------------- ### Set disallowed tags Source: https://www.sceditor.com/documentation/formats/xhtml Define a blacklist of tags that are forbidden in the output. ```javascript sceditor.formats.xhtml.disallowedTags = ['a', 'strong', 'p', 'span', 'div']; ``` -------------------------------- ### BBCode Object Structure Source: https://www.sceditor.com/documentation/custom-bbcodes The template for defining a custom BBCode object, including properties for styles, tags, and formatting behavior. ```javascript { styles: { "stylename": null, "another-style-name": ["value1", "value2"] } tags: { "tag": null, "another-tag": { "attribute1": null, "attribute2": ["value1", "value2"] } } isSelfClosing: false, isInline: true, isHtmlInline: undefined, allowedChildren: null, allowsEmpty: false, excludeClosing: false, skipLastLineBreak: false, strictMatch: false, breakBefore: false, breakStart: false, breakEnd: false, breakAfter: false, format: 'string|function', html: 'string|function', quoteType: sceditor.BBCodeParser.QuoteType.auto } ``` -------------------------------- ### DragDrop Plugin Options Source: https://www.sceditor.com/documentation/plugins/dragdrop Configure file filtering, paste handling, and custom upload behavior using the dragdrop options object. ```javascript dragdrop: { // Array of allowed mime types or null to allow all allowedTypes: ['image/jpeg', 'image/png'], // Function to return if a file is allowed or not, // defaults to always returning true isAllowed: function(file) { return true; }, // If to extract pasted files like images pasted as // base64 encoded URI's. Defaults to true handlePaste: true, // Method that handles the files / uploading etc. handleFile: function (file, createPlaceholder) { // createPlaceholder function will insert a // loading placeholder into the editor and // return an object with inert(html) and // cancel() methods // For example: var placeholder = createPlaceholder(); asyncUpload(file).then(function (url) { // Replace the placeholder with the image HTML placeholder.insert(''); }).catch(function () { // Error so remove the placeholder placeholder.cancel(); }); } } ``` -------------------------------- ### Define a converter object Source: https://www.sceditor.com/documentation/formats/xhtml Structure for creating custom converter objects to transform HTML tags into XHTML. ```javascript { // Object with all the tags to match tags: { // Matches any that has the following attributes 'tagname': { // Will match if tagname has the attribute attributename with // one of the specified values from the array attributename: [ 'an array', 'of values or', 'null to match', 'all values' ], // Will match if it has the attribute anotherattribute regardless // of the attributes value anotherattribute: null }, // Matches any tag 'anothertagname': null }, conv: function(node) { // convert node here } } ``` -------------------------------- ### allowedTags Source: https://www.sceditor.com/documentation/options Defines an array of extra tags that should be allowed in the editor content. ```APIDOC ## allowedTags ### Description An array of extra tags that should be allowed in the editor content. By default, custom HTML elements are removed by the HTML sanitizer. ### Type Array ### Default [] ``` -------------------------------- ### Event Signal Handlers Source: https://www.sceditor.com/documentation/custom-plugins Methods that automatically trigger when specific editor events occur. ```APIDOC ## Event Signal Handlers ### signalReady Called after the editor is created. ### signalKeydownEvent(e) Called on `keydown`. - **e** (event) - The keydown event object. ### signalKeyupEvent(e) Called on `keyup`. - **e** (event) - The keyup event object. ### signalKeypressEvent(e) Called on `keypress`. - **e** (event) - The keypress event object. ### signalFocusEvent(e) Called on `focus`. - **e** (event) - The focus event object. ### signalBlurEvent(e) Called on `blur`. - **e** (event) - The blur event object. ### signalContextmenuEvent(e) Called on `contextmenu`. - **e** (event) - The contextmenu event object. ### signalSelectionchangedEvent(e) Called when selection changes in WYSIWYG mode. - **e** (event) - The selectionchanged event object. ``` -------------------------------- ### Plugin Lifecycle Signals Source: https://www.sceditor.com/documentation/custom-plugins Lifecycle methods called automatically when the plugin is registered or the editor is destroyed. ```APIDOC ## Lifecycle Signals ### init Called when the plugin is registered to the editor. ### destroy Called when `destroy()` is called on the editor or the plugin is removed. Use this to unbind DOM events and perform cleanup. ``` -------------------------------- ### Convert HTML to BBCode Source: https://www.sceditor.com/documentation/formats/bbcode Use the toBBCode method to transform HTML strings or DOM nodes into BBCode. ```javascript var bbcode = instance.toBBCode(html); ``` -------------------------------- ### sceditor.formats.xhtml.converters Source: https://www.sceditor.com/documentation/formats/xhtml An array of converter objects used to convert HTML into valid XHTML or HTML5. Converters define tags to match and a function to perform the conversion. ```APIDOC sceditor.formats.xhtml.converters.push({ tags: { '*': { border: null } }, conv: function(node) { var $node = $(node); $node.css('border-size', $node.attr('border')).removeAttr('border'); } }); ``` -------------------------------- ### toBBCode(html) Source: https://www.sceditor.com/documentation/formats/bbcode Converts HTML or a DOM node into a BBCode string. This method is added to the editor instance when the BBCode format is enabled. ```APIDOC ### toBBCode(html) #### Description Converts HTML or a DOM node to a BBCode string. For YouTube embeds, a `data-youtube-id` attribute must be present on the element. #### Syntax `var bbcode = instance.toBBCode(html);` #### Parameters - **html** (String or Node) - Required - The HTML string or DOM node to convert. #### Return - **String** - The resulting BBCode string. ``` -------------------------------- ### sceditor.plugins.autosave.clear() Source: https://www.sceditor.com/documentation/plugins/autosave Manually clears the auto-saved content from localStorage. If a custom storageKey was used during initialization, it must be passed as the first argument. ```APIDOC ## sceditor.plugins.autosave.clear() ### Description Manually removes auto-saved content from localStorage. This is automatically called when a form containing the editor is submitted. ### Parameters - **storageKey** (String) - Optional - The specific storage key used if a custom one was defined during initialization. ``` -------------------------------- ### Toggle Plaintext Mode Source: https://www.sceditor.com/documentation/plugins/plaintext Enable the toggle button by setting pastetext.addButton to true, allowing users to switch plaintext mode on or off. ```html ``` -------------------------------- ### allowedAttributes Source: https://www.sceditor.com/documentation/options Defines an array of extra attributes that are allowed on tags in the editor content. ```APIDOC ## allowedAttributes ### Description An array of extra attributes that are allowed on tags in the editor content. By default, custom attributes are removed by the HTML sanitizer. ### Type Array ### Default [] ``` -------------------------------- ### SCEditor HTML Structure Source: https://www.sceditor.com/documentation/theming The base HTML markup used by the SCEditor container, including toolbar, iframe, and source mode elements. ```html ``` -------------------------------- ### Define Emoticon Mapping Source: https://www.sceditor.com/documentation/options Structure the emoticons object to categorize icons into dropdown, more, and hidden sections. ```javascript { // Emoticons to be included in the dropdown dropdown: { ':)': 'emoticons/smile.png', ':angel:': 'emoticons/angel.png' }, // Emoticons to be included in the more section more: { ':alien:': 'emoticons/alien.png', ':blink:': 'emoticons/blink.png' }, // Emoticons that are not shown in the dropdown but will still // be converted. Can be used for things like aliases hidden: { ':aliasforalien:': 'emoticons/alien.png', ':aliasforblink:': 'emoticons/blink.png' } } ``` -------------------------------- ### AutoSave Data Object Structure Source: https://www.sceditor.com/documentation/plugins/autosave The schema for the data object passed to the save handler and returned by the load handler. ```javascript { // Object - contains the source mode caret position caret: { // Number - source editor caret start position start: Number // Number - source editor caret end position end: Number }, // Boolean - if in source mode sourceMode: Boolean, // String - editors contents value: String, // Number - current timestamp time: Number } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.