mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-11-30 23:37:16 +01:00
Use medium-editor to rich editor... And some css fixes..
This commit is contained in:
33
js/script.js
33
js/script.js
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user