How put a default text in a HTML component with javascript
-
Suppose to have the default text that it is the value of:
[[user:bookmarks]]
I want put this text in html component that I create with a function:
function createElement(pid) { return '<a name="pid' + pid + '" role="menuitem" tabindex="-1" href="#" data-favourited="false"><span class="favourite-text">[[user:bookmarks]]</span> <i component="post/bookmark/on" class="fa fa-heart hidden"></i><i component="post/bookmark/off" class="fa fa-heart-o"></i></a>' }
The problem is when the link appears, the text is "[[user:bookmarks]]" and not the real text that [[user:bookmarks]] refers. Anyone can help me?
Copyright © 2024 NodeBB | Contributors