DefinitelyTyped/types/tinymce/tinymce-tests.ts
CymruKakashi 82d9295a46 TinyMCE - Spell Checker Pro plugin settings, adding missing functions (#35157)
* Adding in Spell Checker Pro Plugin settings

* Adding in tests for Spell Checker Pro settings

* Missing whitespace & line length test failure fixes

* Adding own name to contributors

* Adding a number of missing tinymce functions

* Resolving lint issues with added functions
2019-05-08 11:15:52 -07:00

66 lines
2.0 KiB
TypeScript

import * as tinymce from 'tinymce';
const settings: tinymce.Settings = {
selector: 'textarea',
height: 500,
menubar: false,
plugins: [
'advlist autolink lists link image charmap print preview anchor',
'searchreplace visualblocks code fullscreen',
'insertdatetime media table contextmenu paste code',
'autosave imagetools'
],
autosave_ask_before_unload: false,
autosave_interval: "20s",
autosave_prefix: "tinymce-autosave-{path}{query}-{id}-",
autosave_restore_when_empty: false,
autosave_retention: "30m",
toolbar: 'undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
content_css: '//www.tinymce.com/css/codepen.min.css',
imagetools_cors_hosts: ['mydomain.com', 'otherdomain.com'],
imagetools_proxy: "proxy.php",
table_toolbar: "tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol",
table_appearance_options: false,
table_clone_elements: "strong em a",
table_grid: false,
table_tab_navigation: false,
table_default_attributes: {
title: 'My table'
},
table_default_styles: {
fontWeight: 'bold'
},
table_class_list: [
{title: 'None', value: ''},
{title: 'Dog', value: 'dog'},
{title: 'Cat', value: 'cat'}
],
table_cell_class_list: [
{title: 'None', value: ''},
{title: 'Dog', value: 'dog'},
{title: 'Cat', value: 'cat'}
],
table_row_class_list: [
{title: 'None', value: ''},
{title: 'Dog', value: 'dog'},
{title: 'Cat', value: 'cat'}
],
table_advtab: false,
table_cell_advtab: false,
table_row_advtab: false,
spellchecker_rpc_url: 'https://mydomain.com',
spellchecker_language: 'en',
spellchecker_languages: 'US English=en,UK English=en_gb',
spellchecker_dialog: true,
spellchecker_whitelist: [
'itemOne',
'itemTwo'
],
spellchecker_on_load: true,
spellchecker_active: true,
};
tinymce.init(settings);
const t = new tinymce.util.Color('#FFFFFF');