Skip to content

Commit 0aad802

Browse files
authored
Merge pull request #20 from m-alzam/master
Fix automatic sanitize removing html tags
2 parents 1297b8c + 1576d61 commit 0aad802

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

dist/bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@editorjs/code",
3-
"version": "2.4.1",
3+
"version": "2.4.2",
44
"keywords": [
55
"codex editor",
66
"code",

src/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,15 @@ class CodeTool {
168168
tags: [ 'pre' ],
169169
};
170170
}
171+
172+
/**
173+
* Automatic sanitize config
174+
*/
175+
static get sanitize() {
176+
return {
177+
code: true // Allow HTML tags
178+
};
179+
}
171180
}
172181

173182
module.exports = CodeTool;

0 commit comments

Comments
 (0)