Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed cache folder #62

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions EditorJS/BlockHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,6 @@ private function getDefaultPurifier()
$sanitizer->set('AutoFormat.RemoveEmpty', true);
$sanitizer->set('HTML.DefinitionID', 'html5-definitions');

$cacheDirectory = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'purifier';
if (!is_dir($cacheDirectory)) {
mkdir($cacheDirectory, 0777, true);
}

$sanitizer->set('Cache.SerializerPath', $cacheDirectory);

return $sanitizer;
}

Expand Down
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,32 +243,32 @@ Another configuration example: [/tests/samples/test-config.json](/tests/samples/
# Exceptions

### EditorJS class
| Exception text | Cause
| ----------------------------- | ------------------------------------------------
| JSON is empty | EditorJS initiated with empty `$json` argument
| Wrong JSON format: `error` | `json_decode` failed during `$json` processing
| Input is null | `json_decode` returned null `$data` object
| Input array is empty | `$data` is an empty array
| Field \`blocks\` is missing | `$data` doesn't contain 'blocks' key
| Blocks is not an array | `$data['blocks']` is not an array
| Block must be an Array | one element in `$data['blocks']` is not an array
| Exception text | Cause |
|-----------------------------|--------------------------------------------------|
| JSON is empty | EditorJS initiated with empty `$json` argument |
| Wrong JSON format: `error` | `json_decode` failed during `$json` processing |
| Input is null | `json_decode` returned null `$data` object |
| Input array is empty | `$data` is an empty array |
| Field \`blocks\` is missing | `$data` doesn't contain 'blocks' key |
| Blocks is not an array | `$data['blocks']` is not an array |
| Block must be an Array | one element in `$data['blocks']` is not an array |

### BlockHandler class
| Exception text | Cause
| --------------------- | -----------------------------------------------
| Tool \`**TOOL_NAME**\` not found in the configuration | Configuration file doesn't contain **TOOL_NAME** in `tools{}` dictionary
| Not found required param \`**key**\` | **key** tool param exists in configuration but doesn't exist in input data. *(Params are always required by default unless `required: false` is set)*
| Found extra param \`**key**\` | Param **key** exists in input data but doesn't defined in configuration
| Option \`**key**\` with value \`**value**\` has invalid value. Check canBeOnly param. | Parameter must have one of the values from **canBeOnly** array in tool configuration
| Option \`**key**\` with value \`**value**\` must be **TYPE** | Param must have type which is defined in tool configuration *(string, integer, boolean)*
| Unhandled type \`**elementType**\` | Param type in configuration is invalid
| Exception text | Cause |
|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
| Tool \`**TOOL_NAME**\` not found in the configuration | Configuration file doesn't contain **TOOL_NAME** in `tools{}` dictionary |
| Not found required param \`**key**\` | **key** tool param exists in configuration but doesn't exist in input data. *(Params are always required by default unless `required: false` is set)* |
| Found extra param \`**key**\` | Param **key** exists in input data but doesn't defined in configuration |
| Option \`**key**\` with value \`**value**\` has invalid value. Check canBeOnly param. | Parameter must have one of the values from **canBeOnly** array in tool configuration |
| Option \`**key**\` with value \`**value**\` must be **TYPE** | Param must have type which is defined in tool configuration *(string, integer, boolean)* |
| Unhandled type \`**elementType**\` | Param type in configuration is invalid |

### ConfigLoader class
| Exception text | Cause
| ----------------------------- | ------------------------------------------------
| Configuration data is empty | EditorJS initiated with empty `$configuration` argument
| Tools not found in configuration | Configuration file doesn't contain `tools` key
| Duplicate tool \`**toolName**\` in configuration | Configuration file has different tools with the same name
| Exception text | Cause |
|--------------------------------------------------|-----------------------------------------------------------|
| Configuration data is empty | EditorJS initiated with empty `$configuration` argument |
| Tools not found in configuration | Configuration file doesn't contain `tools` key |
| Duplicate tool \`**toolName**\` in configuration | Configuration file has different tools with the same name |

# Make Tools

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "codex-team/editor.js",
"name": "desti/editor.js",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to undo this change

"type": "library",
"description": "PHP backend implementation for the Editor.js",
"license": "MIT",
Expand Down