You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
All: Extract note renderer to separate package (WIP) (#2206)
* Started updating to use external renderer package * Added way to build renderer assets * Done mobile compatilibty * Upgrade joplin-renderer * Added joplin-renderer package
This commit is contained in:
@ -11,6 +11,7 @@ const { _ } = require('lib/locale.js');
|
||||
const ArrayUtils = require('lib/ArrayUtils.js');
|
||||
const lodash = require('lodash');
|
||||
const urlUtils = require('lib/urlUtils.js');
|
||||
const { MarkupToHtml } = require('joplin-renderer');
|
||||
|
||||
class Note extends BaseItem {
|
||||
static tableName() {
|
||||
@ -624,8 +625,8 @@ class Note extends BaseItem {
|
||||
}
|
||||
|
||||
static markupLanguageToLabel(markupLanguageId) {
|
||||
if (markupLanguageId === Note.MARKUP_LANGUAGE_MARKDOWN) return 'Markdown';
|
||||
if (markupLanguageId === Note.MARKUP_LANGUAGE_HTML) return 'HTML';
|
||||
if (markupLanguageId === MarkupToHtml.MARKUP_LANGUAGE_MARKDOWN) return 'Markdown';
|
||||
if (markupLanguageId === MarkupToHtml.MARKUP_LANGUAGE_HTML) return 'HTML';
|
||||
throw new Error(`Invalid markup language ID: ${markupLanguageId}`);
|
||||
}
|
||||
}
|
||||
@ -633,7 +634,4 @@ class Note extends BaseItem {
|
||||
Note.updateGeolocationEnabled_ = true;
|
||||
Note.geolocationUpdating_ = false;
|
||||
|
||||
Note.MARKUP_LANGUAGE_MARKDOWN = 1;
|
||||
Note.MARKUP_LANGUAGE_HTML = 2;
|
||||
|
||||
module.exports = Note;
|
||||
|
Reference in New Issue
Block a user