From 91f8edd2debd4c8a10ecb0ca30b5b6d2a280437c Mon Sep 17 00:00:00 2001 From: Pierre Date: Wed, 23 May 2018 21:14:38 +0200 Subject: [PATCH] Create

tags quickly --- assets/js/common/utils.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/assets/js/common/utils.js b/assets/js/common/utils.js index 2e32fb67..7799faaa 100644 --- a/assets/js/common/utils.js +++ b/assets/js/common/utils.js @@ -460,6 +460,21 @@ function add_space(target){ } +/** + * Create and append a new paragraph + * + * @param {HTMLElement} target The target for the new paragraph + * @param {String} content The new content for the paragraph + * @returns {HTMLElement} Generated element + */ +function add_p(target, content){ + return createElem2({ + appendTo: target, + type: "p", + innerHTML: content + }); +} + /** * Get the current absolute position bottom of the screen *