added 'quote' back to the exended wiki editor
This commit is contained in:
parent
7024bcd61d
commit
8664ed78f3
@ -709,6 +709,7 @@ $history = $file['history'];
|
||||
if (!empty($related_issues))
|
||||
{
|
||||
print '<div><ul id="code_revision_related_issue_list" class="codepot-horizontal-list">';
|
||||
print '<li><i class="fa fa-hand-o-right"></i> </li>';
|
||||
foreach ($related_issues as $ri)
|
||||
{
|
||||
$hex_issueid = $this->converter->AsciiToHex ($ri->issueid);
|
||||
|
@ -24,7 +24,7 @@
|
||||
<script type="text/javascript" src="<?php print base_url_make('/js/jquery-ui.min.js')?>"></script>
|
||||
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/jquery-ui.css')?>" />
|
||||
|
||||
<script type="text/javascript" src="<?php print base_url_make('/js/medium-editor.min.js')?>"></script>
|
||||
<script type="text/javascript" src="<?php print base_url_make('/js/medium-editor.js')?>"></script>
|
||||
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/medium-editor.min.css')?>" />
|
||||
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/medium-editor-theme.min.css')?>" />
|
||||
|
||||
@ -370,7 +370,7 @@ $(function () {
|
||||
'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
|
||||
'subscript', 'superscript', 'removeFormat',
|
||||
'pre', 'anchor', 'image',
|
||||
'orderedlist', 'unorderedlist', 'indent', 'outdent',
|
||||
'orderedlist', 'unorderedlist', 'quote', 'indent', 'outdent',
|
||||
'justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull',
|
||||
'table'],
|
||||
diffLeft: 0,
|
||||
@ -459,6 +459,13 @@ $(function () {
|
||||
shift: false,
|
||||
alt: true
|
||||
},
|
||||
{ // alt-q
|
||||
command: 'append-blockquote',
|
||||
key: 'Q',
|
||||
meta: false,
|
||||
shift: false,
|
||||
alt: true
|
||||
},
|
||||
{ // alt-h
|
||||
command: 'append-h1',
|
||||
key: 'H',
|
||||
|
@ -817,14 +817,23 @@ span.codepot-open-issue-count {
|
||||
line-height: 0.9em;
|
||||
}
|
||||
|
||||
/* normal blockquote is for indentation */ */
|
||||
.codepot-plain-text-view blockquote,
|
||||
.codepot-styled-text-view blockquote,
|
||||
.codepot-styled-text-preview blockquote {
|
||||
/*background: #F5F5F5;*/
|
||||
background: inherit;
|
||||
border-left: 3px solid #EEEEEE;
|
||||
margin: 1em 1em 1em 1em;
|
||||
padding: 0.5em 0.5em 0.5em 0.5em;
|
||||
margin-left: 2em;
|
||||
margin-right: 2em;
|
||||
}
|
||||
|
||||
.codepot-plain-text-view blockquote.codepot-formatted-block,
|
||||
.codepot-styled-text-view blockquote.codepot-formatted-block,
|
||||
.codepot-styled-text-preview blockquote.codepot-formatted-block {
|
||||
background: #F5F5F5;
|
||||
border-left: 5px solid #E0E0E0;
|
||||
margin-left: 2em;
|
||||
margin-right: 2em;
|
||||
padding: 0.1em 0.5em 0.1em 0.5em;
|
||||
}
|
||||
|
||||
.codepot-plain-text-view pre,
|
||||
|
@ -531,7 +531,7 @@ Table.prototype = {
|
||||
// end codepot
|
||||
|
||||
this._editor.pasteHTML(
|
||||
'<table class="medium-editor-table" id="medium-editor-table"' +
|
||||
'<p> </p><table class="medium-editor-table" id="medium-editor-table"' +
|
||||
' >' +
|
||||
// codepot
|
||||
'<thead>' +
|
||||
@ -543,7 +543,7 @@ Table.prototype = {
|
||||
'</tbody>' +
|
||||
// codepot
|
||||
//'</table>', {
|
||||
'</table><p></p>', {
|
||||
'</table><p> </p>', {
|
||||
// end codepot
|
||||
cleanAttrs: [],
|
||||
cleanTags: []
|
||||
|
@ -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
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user