mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-02-14 09:18:41 +00:00
add todos from github
This commit is contained in:
parent
d5f7aae34a
commit
78c500334b
|
|
@ -23,12 +23,6 @@ jsOMS.Modules.Editor = class {
|
||||||
|
|
||||||
bindElement (id)
|
bindElement (id)
|
||||||
{
|
{
|
||||||
if (typeof id === 'undefined' || !id) {
|
|
||||||
// todo: do logging
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.editors[id] = new Editor(id);
|
this.editors[id] = new Editor(id);
|
||||||
this.editors[id].bind();
|
this.editors[id].bind();
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,14 @@ use phpOMS\Utils\Parser\Markdown\Markdown;
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
*
|
||||||
|
* @todo Orange-Management/Moduels#14
|
||||||
|
* The editor should support (maybe as extension) versioning.
|
||||||
|
* This doesn't have to be git or svn but at least multiple version should be able to get stored into the database.
|
||||||
|
* The versioning should be very straight forward and only contain a version number, date and optionally a version name.
|
||||||
|
* The basic save button should be just "save new version" or something similar.
|
||||||
|
* Based on this it should also be possible to compare different versions against each other.
|
||||||
|
* It should be possible to see who wrote which word, when and what it got changed to (e.g. git or microsoft track change mode).
|
||||||
*/
|
*/
|
||||||
final class ApiController extends Controller
|
final class ApiController extends Controller
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,17 @@
|
||||||
import { Markdown } from '../../../jsOMS/Utils/Parser/Markdown.js';
|
import { Markdown } from '../../../jsOMS/Utils/Parser/Markdown.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Editor
|
||||||
|
*
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @since 1.0.0
|
||||||
|
*
|
||||||
|
* @todo Orange-Management/Modules#45
|
||||||
|
* Implement tools
|
||||||
|
* The tools should be able to insert the markdown text into a textarea.
|
||||||
|
*/
|
||||||
export class Editor {
|
export class Editor {
|
||||||
constructor (id)
|
constructor (id)
|
||||||
{
|
{
|
||||||
|
|
@ -20,7 +32,6 @@ export class Editor {
|
||||||
|
|
||||||
for (let i = 0; i < length; ++i) {
|
for (let i = 0; i < length; ++i) {
|
||||||
editorButtons[i].addEventListener('click', function(event) {
|
editorButtons[i].addEventListener('click', function(event) {
|
||||||
// todo: identify button by class and then call function for this class.
|
|
||||||
self.toolsButton(this, event);
|
self.toolsButton(this, event);
|
||||||
jsOMS.triggerEvent(self.editorContent, 'input');
|
jsOMS.triggerEvent(self.editorContent, 'input');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user