This commit is contained in:
Murod Khaydarov 2017-04-23 01:08:10 +03:00
parent 49a4290e8e
commit a281802b18
6 changed files with 17 additions and 14 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -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',

View file

@ -941,7 +941,6 @@ module.exports = (function (callbacks) {
if ( htmlData.trim() != '' ) {
console.log('here');
cleanData = editor.sanitizer.clean(htmlData);
div.innerHTML = cleanData;

View file

@ -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);

View file

@ -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>>'
};