Editor WYSIWYG limpio mínimo en Pure JavaScript-v2editor. js

Tiempo de ejecución: 30 minutos. Empezar

Autor: dphans
Views Total: 2,065
Sitio oficial: Ir a la web
Actualizado: April 27, 2017
Licencia: MIT

Vista prévia

Editor WYSIWYG limpio mínimo en Pure JavaScript-v2editor. js

Descripción

v2editor.js is a simple yet customizable JavaScript library used to create a minimal clean WYSIWYG rich text editor on your web application.

Funcionamiento

Importe los archivos JavaScript y CSS v2editor's en la Página Web.

<link rel="stylesheet" href="v2editor.min.css">
<script src="v2editor.js"></script>

Cree un elemento de marcador de posición para el editor.

<div id="MainEditor"></div>

Inicializar el editor con sólo una línea JavaScript.

window.initEditor = function () {

window.mainEditor = new Editor('MainEditor', {});
};

Opciones de configuración posibles.

window.initEditor = function () {

window.mainEditor = new Editor('MainEditor', {


/**


 * Option merge strategies (used in core/util/options)


 */


optionMergeStrategies: Object.create(null),



/**


 * Whether to suppress warnings.


 */


silent: false,



/**


 * Show production mode tip message on boot?


 */


productionTip: "development" !== 'production',



/**


 * Whether to enable devtools


 */


devtools: "development" !== 'production',



/**


 * Whether to record perf


 */


performance: false,



/**


 * Error handler for watcher errors


 */


errorHandler: null,



/**


 * Ignore certain custom elements


 */


ignoredElements: [],



/**


 * Custom user key aliases for v-on


 */


keyCodes: Object.create(null),



/**


 * Check if a tag is reserved so that it cannot be registered as a


 * component. This is platform-dependent and may be overwritten.


 */


isReservedTag: no,



/**


 * Check if a tag is an unknown element.


 * Platform-dependent.


 */


isUnknownElement: no,



/**


 * Get the namespace of an element


 */


getTagNamespace: noop,



/**


 * Parse the real tag name for the specific platform.


 */


parsePlatformTagName: identity,



/**


 * Check if an attribute must be bound using property, e.g. value


 * Platform-dependent.


 */


mustUseProp: no,



/**


 * List of asset types that a component can own.


 */


_assetTypes: [



'component',



'directive',



'filter'


],



/**


 * List of lifecycle hooks.


 */


_lifecycleHooks: [



'beforeCreate',



'created',



'beforeMount',



'mounted',



'beforeUpdate',



'updated',



'beforeDestroy',



'destroyed',



'activated',



'deactivated'


],



/**


 * Max circular updates allowed in a scheduler flush cycle.


 */


_maxUpdateCount: 100

});
};

Te puede interesar: