Nature of Spiritual Writings When I write certain texts, in the presence of inspiration, the topic turns towards high ideals, for example beauty. The phenomenon is odd and prevalent in my life: I have written hundreds of such texts, where the topic of beauty appears almost spontaneously. It usually generates a strong awe.

I'm unsure what is going on in these cases; am I generating some archetype? Am I engaging in a spiritual process? I even write beauty as 'Beauty', with a capital 'B', to suggest its ideal nature, which was common in western history. 

Or, in the context of Buddhism, am I generating more attachment? Basically, despite me not feeling attached, I consistently and inevitably return to the topic of beauty and high ideals, almost in an obsessive manner. People I've shown these texts to say they don't quite follow what I'm saying in them. 

For such a somewhat spiritual experience, how can I know whether I'm doing something meaningful and legitimate, or just causing more attachment?

In sum, I'm asking how this experience -- or other spiritual experiences -- are evaluated in Buddhism.
When doing your writing see what feelings you get and does it lead to:

a decrease in unwholesome states and/or increase in wholesome states
an increase in unwholesome states and/or decrease in wholesome states


“What now, bhikshus, haven’t you known me to have taught the Dharma in this way:

THE 2 KINDS OF PLEASANT FEELINGS.

Here, when one feels a certain kind of pleasant feeling, unwholesome states grow in him and wholesome states lessen;
but when one feels another kind of pleasant
feeling, unwholesome states lessen in him and wholesome states grow.


THE 2 KINDS OF PAINFUL FEELINGS.

Here, when one feels a certain kind of painful feeling, unwholesome states grow in him and wholesome states lessen;
but when one feels another kind of painful feeling, unwholesome states lessen in him and wholesome states grow.


THE 2 KINDS OF NEUTRAL FEELINGS.

Here, when one feels a certain kind of neutral feeling, unwholesome states grow in him and wholesome states lessen;
but when one feels another kind of neutral feeling, unwholesome states lessen in him and wholesome states grow.’?”



... [more detail description of the above follows in the Sutta]

Kīṭā,giri Sutta
If what you write increases lust, fantasy/delusion, greed, etc. then this is unwholesome.
Since ou writing is spiritual it might be wholesome if you write is in line with the Dhamma.
One way to discern how unwholesome states arise is as follows:

(1) the latent tendency to lust reinforced by being attached to pleasant feelings;
(2) the latent tendency to aversion reinforced by rejecting painful feelings;
(3) the latent tendency to ignorance reinforced by ignoring neutral feelings;

Pahāna Sutta
Dealing with sensations at a more granular level can be found in: Sal,āyatana Vibhanga Sutta