MOBILE-3657 text: Add CoreTextFormat enum

main
Pau Ferrer Ocaña 2021-04-01 08:56:57 +02:00
parent d7970bbf5e
commit 8addd2074d
1 changed files with 13 additions and 1 deletions

View File

@ -1097,6 +1097,7 @@ export class CoreTextUtilsProvider {
}
}
export const CoreTextUtils = makeSingleton(CoreTextUtilsProvider);
/**
* Options for viewText.
@ -1113,4 +1114,15 @@ export type CoreTextUtilsViewTextOptions = {
modalOptions?: Partial<ModalOptions>; // Modal options.
};
export const CoreTextUtils = makeSingleton(CoreTextUtilsProvider);
/**
* Define text formatting types.
*/
export enum CoreTextFormat {
FORMAT_MOODLE = 0, // Does all sorts of transformations and filtering.
FORMAT_HTML = 1, // Plain HTML (with some tags stripped). Use it by default.
FORMAT_PLAIN = 2, // Plain text (even tags are printed in full).
// FORMAT_WIKI is deprecated since 2005...
FORMAT_MARKDOWN = 4, // Markdown-formatted text http://daringfireball.net/projects/markdown/
}
export const defaultTextFormat = CoreTextFormat.FORMAT_HTML;