init
This commit is contained in:
20
public/tinymce/src/plugins/visualchars/main/ts/api/Api.ts
Normal file
20
public/tinymce/src/plugins/visualchars/main/ts/api/Api.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
||||
* Licensed under the LGPL or a commercial license.
|
||||
* For LGPL see License.txt in the project root for license information.
|
||||
* For commercial licenses see https://www.tiny.cloud/
|
||||
*/
|
||||
|
||||
const get = function (toggleState) {
|
||||
const isEnabled = function () {
|
||||
return toggleState.get();
|
||||
};
|
||||
|
||||
return {
|
||||
isEnabled
|
||||
};
|
||||
};
|
||||
|
||||
export default {
|
||||
get
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
||||
* Licensed under the LGPL or a commercial license.
|
||||
* For LGPL see License.txt in the project root for license information.
|
||||
* For commercial licenses see https://www.tiny.cloud/
|
||||
*/
|
||||
|
||||
import Actions from '../core/Actions';
|
||||
|
||||
const register = function (editor, toggleState) {
|
||||
editor.addCommand('mceVisualChars', function () {
|
||||
Actions.toggleVisualChars(editor, toggleState);
|
||||
});
|
||||
};
|
||||
|
||||
export default {
|
||||
register
|
||||
};
|
||||
14
public/tinymce/src/plugins/visualchars/main/ts/api/Events.ts
Normal file
14
public/tinymce/src/plugins/visualchars/main/ts/api/Events.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
||||
* Licensed under the LGPL or a commercial license.
|
||||
* For LGPL see License.txt in the project root for license information.
|
||||
* For commercial licenses see https://www.tiny.cloud/
|
||||
*/
|
||||
|
||||
const fireVisualChars = function (editor, state) {
|
||||
return editor.fire('VisualChars', { state });
|
||||
};
|
||||
|
||||
export default {
|
||||
fireVisualChars
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
||||
* Licensed under the LGPL or a commercial license.
|
||||
* For LGPL see License.txt in the project root for license information.
|
||||
* For commercial licenses see https://www.tiny.cloud/
|
||||
*/
|
||||
|
||||
import { Editor } from 'tinymce/core/api/Editor';
|
||||
|
||||
const isEnabledByDefault = (editor: Editor) => {
|
||||
return editor.getParam('visualchars_default_state', false);
|
||||
};
|
||||
|
||||
export default {
|
||||
isEnabledByDefault
|
||||
};
|
||||
Reference in New Issue
Block a user