mirror of
https://github.com/codex-team/editor.js
synced 2024-06-09 17:32:31 +02:00
formatting
This commit is contained in:
parent
e612cba1a6
commit
545247d561
|
@ -15,7 +15,7 @@ export default class ToolsAPI extends Module {
|
|||
*/
|
||||
public get methods(): Tools {
|
||||
return {
|
||||
updateToolConfig:(toolName:string, config: ToolConfig) => this.updateToolConfig(toolName, config),
|
||||
updateToolConfig: (toolName: string, config: ToolConfig) => this.updateToolConfig(toolName, config),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ export default class ToolsAPI extends Module {
|
|||
* @param toolName Name of the tool
|
||||
* @param config Tools Config
|
||||
*/
|
||||
public updateToolConfig(toolName:string, config: ToolConfig): void {
|
||||
public updateToolConfig(toolName: string, config: ToolConfig): void {
|
||||
const tool = this.Editor.Tools.available.get(toolName);
|
||||
|
||||
if (tool) {
|
||||
|
|
|
@ -221,7 +221,7 @@ export default abstract class BaseTool<Type extends Tool = Tool> {
|
|||
*
|
||||
* @param {ToolConfig} config - Tool's config
|
||||
*/
|
||||
public updateConfig(config: ToolConfig):void {
|
||||
public updateConfig(config: ToolConfig): void {
|
||||
if (this.config) {
|
||||
this.config[UserSettings.Config] = config;
|
||||
}
|
||||
|
|
14
types/api/tools.d.ts
vendored
14
types/api/tools.d.ts
vendored
|
@ -4,11 +4,11 @@ import { ToolConfig } from '../tools';
|
|||
* Describes Tools API methods
|
||||
*/
|
||||
export interface Tools {
|
||||
/**
|
||||
* Updates tool's config
|
||||
*
|
||||
* @param toolName Name of the tool
|
||||
* @param type inline or block tools
|
||||
*/
|
||||
updateToolConfig(toolName:string, config: ToolConfig): void
|
||||
/**
|
||||
* Updates tool's config
|
||||
*
|
||||
* @param toolName name of the tool
|
||||
* @param config config of the tool
|
||||
*/
|
||||
updateToolConfig(toolName: string, config: ToolConfig): void
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue