
If only an external force is added to a shared node the moment will be continuous, but the element will have different polynomials and there will be a change in the slope of the moment diagram The following two figures shows this situation.

The moment diagram would be as follows:

If a moment is applied at a shared node it will be added to the moment for one or both elements that share the node, depending on the boundary conditions for the particular problem.