Add elements or nodes

(SMHassanAlavi) #1

I want to add some elements to my website with javascript and I want to form elements as should I do add tiles (nodes) to my page?
totally, Can we add nodes(elements) to discourse via plugin?

(SMHassanAlavi) #2

no answer?
I need it

(cpradio) #3

Can you mock up what you are wanting to do? I’m not sure I understand the end goal enough to make any suggestions.

(SMHassanAlavi) #4

I have a html code as element for example:
> var element = document.create(“div”);
> element.innerHTML = “<h1.>hello world”;
and I want to insert this code after second "class=‘row’ " but I don’t know how to do this in discourse?

(Mittineague) #5

I don’t know how extensive the DOM changes are that you have in mind to do, or if this is for your own site or to share with others.

But if relatively trivial and for your own site maybe an Admin -> Customize would suffice. eg. the script part here: