IDEMSInternational / open-app-builder

PLH App Frontend
GNU General Public License v3.0
6 stars 25 forks source link

Text formatting by converting to HTML #1005

Open esmeetewinkel opened 3 years ago

esmeetewinkel commented 3 years ago

Details There is some old code that interprets bold and italics text in within a template spreadsheet cell by converting it to HTML.

This syntax is not used anywhere in the app, and is prone to errors (see also @chrismclarke's comment on issue #1003). Since the same result can be achieved by using markdown, this code could probably be removed.

Feature template feature_formatting

Screenshots and videos image

chrismclarke commented 3 years ago

One small technical note, is that the html is generated automatically from google sheets whenever formatting is used within the sheet (we don't do anything special to enable it as it is the default behaviour). Similarly, anywhere we are using markdown or have manually added innerHtml content bindings will also by default render the html.

So in order to 'disable' this feature, we would actually need to add scripts to strip the html out (the behaviour is default/side-effect from enabling markdown). This would likely be done in the parser, and so we would also lose the ability to hardcode any html into any excel templates (not that I'm suggesting we would want to).

Some examples for stripping html from text content are given here: https://stackoverflow.com/questions/822452/strip-html-from-text-javascript/47140708#47140708

ChrisMarsh82 commented 3 years ago

This should be off by default, however, may be good to keep the ability if we need it in the future.

zulkifelff commented 2 years ago

@EsmeeIDEMS , Is this issue discussed ? If yes , please update the issue so that I can assign it to @thisishamza for development.