mirror of
https://github.com/codex-team/editor.js
synced 2024-06-27 09:50:05 +02:00
update
This commit is contained in:
parent
49a4290e8e
commit
a281802b18
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -20,8 +20,7 @@
|
|||
<script src="codex-editor.js?v=108"></script>
|
||||
<link rel="stylesheet" href="codex-editor.css?v=11000">
|
||||
|
||||
|
||||
<script src="plugins/paragraph/paragraph.js"></script>
|
||||
<script src="plugins/paragraph/paragraph.js?v=100"></script>
|
||||
<link rel="stylesheet" href="plugins/paragraph/paragraph.css">
|
||||
|
||||
<script src="plugins/header/header.js"></script>
|
||||
|
@ -62,11 +61,6 @@
|
|||
holderId : "codex-editor",
|
||||
initialBlockPlugin : 'paragraph',
|
||||
hideToolbar: false,
|
||||
sanitizer : {
|
||||
tags : {
|
||||
p : {}
|
||||
}
|
||||
},
|
||||
tools : {
|
||||
paragraph: {
|
||||
type: 'paragraph',
|
||||
|
|
|
@ -941,7 +941,6 @@ module.exports = (function (callbacks) {
|
|||
|
||||
if ( htmlData.trim() != '' ) {
|
||||
|
||||
console.log('here');
|
||||
cleanData = editor.sanitizer.clean(htmlData);
|
||||
div.innerHTML = cleanData;
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@ module.exports = (function (sanitizer) {
|
|||
let init_ = function (userCustomConfig) {
|
||||
|
||||
let configuration = userCustomConfig || Config.CUSTOM || Config.BASIC;
|
||||
console.log(configuration);
|
||||
|
||||
return new janitor(configuration);
|
||||
|
||||
|
@ -65,7 +64,6 @@ module.exports = (function (sanitizer) {
|
|||
*/
|
||||
sanitizer.clean = function(dirtyString, customConfig) {
|
||||
|
||||
console.log('her');
|
||||
let janitorInstance = init_(customConfig);
|
||||
|
||||
return janitorInstance.clean(dirtyString);
|
||||
|
|
|
@ -80,10 +80,22 @@ var paragraph = (function(paragraph_plugin) {
|
|||
*/
|
||||
paragraph_plugin.save = function (blockContent){
|
||||
|
||||
var wrappedText = codex.editor.content.wrapTextWithParagraphs(blockContent.innerHTML);
|
||||
var wrappedText = codex.editor.content.wrapTextWithParagraphs(blockContent.innerHTML),
|
||||
sanitizerConfig = {
|
||||
tags : {
|
||||
p : {},
|
||||
a: {
|
||||
href: true,
|
||||
target: '_blank',
|
||||
rel: 'nofollow'
|
||||
},
|
||||
i: {},
|
||||
b: {},
|
||||
}
|
||||
};
|
||||
|
||||
var data = {
|
||||
"text": wrappedText,
|
||||
"text": codex.editor.sanitizer.clean(wrappedText, sanitizerConfig),
|
||||
"format": "html",
|
||||
"introText": '<<same>>'
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue