Use medium-editor to rich editor... And some css fixes..

This commit is contained in:
Matias De lellis
2017-01-30 19:44:30 -03:00
parent 95429c2d64
commit 8476ab646f
3 changed files with 51 additions and 5 deletions

View File

@@ -5,7 +5,7 @@
* later. See the COPYING file.
*
* @author Matias De lellis <mati86dl@gmail.com>
* @copyright Matias De lellis 2016
* @copyright Matias De lellis 2016-2017
*/
(function (OC, window, $, undefined) {
@@ -242,6 +242,37 @@ View.prototype = {
modalcontent.html(content);
modalnote.css("background-color", color);
var autolist = new AutoList();
var editor = new MediumEditor(modalcontent, {
toolbar: {
buttons: [
'bold',
'italic',
{
name: 'h1',
action: 'append-h2',
aria: 'header type 1',
tagNames: ['h2'],
contentDefault: '<h2>H</h2>',
attrs: {
'data-custom-attr': 'attr-value-h1'
}
},
'justifyLeft', 'justifyCenter', 'justifyRight',
'unorderedlist','orderedlist',
'quote'
]
},
autoLink: true,
paste: {
forcePlainText: false,
cleanPastedHTML: false
},
extensions: {
'autolist': autolist
}
});
/* Positioning the modal to the original size */
$(".modal-content").css({
"position" : "absolute",