This would make Template creation even more practical for experienced users, and increase a lot intuitiveness for new users.
I would use a JavaScript RegEx in the client code, like the following, to catch all PlaceHolders and HandleBars tags:
Depending on the implementation I would:
Thank you for your consideration. I hope this may help future and current users.
Jacopo
I would use a JavaScript RegEx in the client code, like the following, to catch all PlaceHolders and HandleBars tags:
Code:
{{?[^}]*}}?
- give a warning if inside a PlaceHolders or HandleBars tag some HTML is found. For example, if the following RegEx matches:
Code:<[^>]+?>
- If it is acceptable with the current EspoCRM implementation, it may be possible to forbid formatting inside a PlaceHolder or HandleBar tag using some custom JavaScript code applied to the built-in editor, to prevent such kind of errors. When doing so, a warning in the UI should be issued.
- in the PHP code, it may be possible move the HTML code that is inside of the tag on it's right or left before running the template (accepting some empty tags may be generated, but avoiding an 500 Error). In this case a Warning should be added to the EspoCRM log.
Thank you for your consideration. I hope this may help future and current users.
Jacopo