Skip to main content
added 4 characters in body
Source Link

This function and call might help you remove all layers of type 'TEXT'; (I've not tested it so be careful).

removeLayers( ArtLayer.TEXT, app.activeDocument );

/**
 * @param {LayerKind} layerKind  The kind/type of layer to filter
 * @param {Document}  psDocument The Photoshop document
 */
function removeLayers( layerKind, psDocument ) {
    for ( var layer in psDocument.artLayers ) {
        if ( layer.kind === layerKind ) {
            layer.remove();
        }
    }
}

This function and call might help you remove all layers of type 'TEXT'; (I've not tested it so be careful).

removeLayers( ArtLayer.TEXT, app.activeDocument );

/**
 * @param LayerKind layerKind  The kind/type of layer to filter
 * @param Document  psDocument The Photoshop document
 */
function removeLayers( layerKind, psDocument ) {
    for ( var layer in psDocument.artLayers ) {
        if ( layer.kind === layerKind ) {
            layer.remove();
        }
    }
}

This function and call might help you remove all layers of type 'TEXT'; (I've not tested it so be careful).

removeLayers( ArtLayer.TEXT, app.activeDocument );

/**
 * @param {LayerKind} layerKind  The kind/type of layer to filter
 * @param {Document}  psDocument The Photoshop document
 */
function removeLayers( layerKind, psDocument ) {
    for ( var layer in psDocument.artLayers ) {
        if ( layer.kind === layerKind ) {
            layer.remove();
        }
    }
}
added 2 characters in body
Source Link

This function and call might help you remove all layers of type 'TEXT'; (I've not tested it so be careful).

removeLayers( ArtLayer.TEXT, app.activeDocument );

/**
 * @param LayerKind layerKind  The kind/type of layer to filter
 * @param Document  psDocument The Photoshop document
 */
function removeLayers( layerKind, psDocument ) {
    for ( var layer in psDocument.artLayers ) {
        if ( layer.kind === layerKind ) {
            layer.remove();
        }
    }
}

This function and call might help you remove all layers of type 'TEXT'; (I've not tested it so be careful).

removeLayers(ArtLayer.TEXT, app.activeDocument);

/**
 * @param LayerKind layerKind  The kind/type of layer to filter
 * @param Document  psDocument The Photoshop document
 */
function removeLayers( layerKind, psDocument ) {
    for ( var layer in psDocument.artLayers ) {
        if ( layer.kind === layerKind ) {
            layer.remove();
        }
    }
}

This function and call might help you remove all layers of type 'TEXT'; (I've not tested it so be careful).

removeLayers( ArtLayer.TEXT, app.activeDocument );

/**
 * @param LayerKind layerKind  The kind/type of layer to filter
 * @param Document  psDocument The Photoshop document
 */
function removeLayers( layerKind, psDocument ) {
    for ( var layer in psDocument.artLayers ) {
        if ( layer.kind === layerKind ) {
            layer.remove();
        }
    }
}
Source Link

This function and call might help you remove all layers of type 'TEXT'; (I've not tested it so be careful).

removeLayers(ArtLayer.TEXT, app.activeDocument);

/**
 * @param LayerKind layerKind  The kind/type of layer to filter
 * @param Document  psDocument The Photoshop document
 */
function removeLayers( layerKind, psDocument ) {
    for ( var layer in psDocument.artLayers ) {
        if ( layer.kind === layerKind ) {
            layer.remove();
        }
    }
}