---
title:        "Tweaks: Editable text with default value"
description:  "The following steps will show you how to clone the \"Editable text\" web part and change it's code to display default texts (e.g. {%DocumentName%} macro for the title) for your editors."
url:          https://www.jeroenfurst.nl/blog/Tweaks-Editable-text-with-default-value
date:         2011-06-20
category:     Web parts and page templates
tags:         [Web parts and page templates]
reading_time: 1
---

# Tweaks: Editable text with default value

> The following steps will show you how to clone the "Editable text" web part and change it's code to display default texts (e.g. {%DocumentName%} macro for the title) for your editors.

The following steps will show you how to clone the "Editable text" web part and change it's code to display default texts (e.g. {%DocumentName%} macro for the title) for your editors.
 
 **Step 1:** Clone the "Editable text" web part:
 
 ![](~/getContentAsset/b682d477-85fc-4770-9e33-4ac1491018a6/310c1ea5-13ca-4d75-95a0-620f51989b44/1a2cb970_clone_web_part.png.png)
 
 **Step 2:** Locate the code behind (~\\CMSWebParts\\Text\\editabletextwithdefaultvalue.ascx.cs) and modify line 690 as follows:
 
 ![](~/getContentAsset/c9b3ac09-9717-4954-b266-563e8b044c83/310c1ea5-13ca-4d75-95a0-620f51989b44/11a81ae8_code.png.png)
 
 **Step 3:** Add the newly created web part and fill in some default text:
 
 ![default_value.png](~/getContentAsset/a39e7ba6-d47e-4c64-9208-261037ff3b84/310c1ea5-13ca-4d75-95a0-620f51989b44/default_value.png.png)
 
 **Step 4:** View the result:
 
 ![result.png](~/getContentAsset/9ed7db19-9c44-4e1c-a36c-3e2a5bde1e55/310c1ea5-13ca-4d75-95a0-620f51989b44/0d005253_result.png.png)