diff --git a/codepot/src/codepot/views/code_revision.php b/codepot/src/codepot/views/code_revision.php index 7d5ebd11..34e1cd1b 100644 --- a/codepot/src/codepot/views/code_revision.php +++ b/codepot/src/codepot/views/code_revision.php @@ -709,6 +709,7 @@ $history = $file['history']; if (!empty($related_issues)) { print '
', { // end codepot cleanAttrs: [], cleanTags: [] diff --git a/codepot/src/js/medium-editor.js b/codepot/src/js/medium-editor.js index eaa0d834..c54413b0 100644 --- a/codepot/src/js/medium-editor.js +++ b/codepot/src/js/medium-editor.js @@ -936,7 +936,22 @@ MediumEditor.extensions = {}; } } - return doc.execCommand('formatBlock', false, tagName); + // codepot + // return doc.execCommand('formatBlock', false, tagName); + var ret = doc.execCommand('formatBlock', false, tagName); + if (tagName == 'blockquote') + { + var node = window.getSelection().focusNode.parentNode; + +console.log ("%o", node); + if (node && node.tagName.toLowerCase() == 'p') + node = node.parentNode; + + if (node && node.tagName.toLowerCase() == 'blockquote') + node.classList.add ("codepot-formatted-block"); + } + return ret; + // end codepot }, /**