FreeSLP.com
Welcome to FreeSLP.com's interactive text editor! Here's how to use this tool:
Changing Word Colors
- Select a color from the color palette below.
- Click on any word in your text to change its color.
- Use the "Reset Text Color" button to remove all coloring.
Saving Your Work
- Click "Download" to save your work as an HTML file.
- To reopen a saved file, click "Upload."
Printing
- Click "Print" to get a clean, printable version of your text.
Write here...
${content}
`], { type: 'text/html' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'my_story.html';
a.click();
URL.revokeObjectURL(url);
});
// Upload handlers
uploadButton.addEventListener('click', () => fileInput.click());
fileInput.addEventListener('change', function(e) {
const file = e.target.files[0];
if (!file) return;
const reader = new FileReader();
reader.onload = function(e) {
const content = e.target.result;
if (file.type === 'text/html') {
const parser = new DOMParser();
const doc = parser.parseFromString(content, 'text/html');
const storyContent = doc.getElementById('story-content');
editableStory.innerHTML = storyContent ? storyContent.innerHTML : doc.body.innerHTML;
} else {
editableStory.textContent = content;
}
editableStory.classList.remove('placeholder');
};
reader.readAsText(file);
});
// Print handler
printButton.addEventListener('click', function() {
if (editableStory.classList.contains('placeholder')) return;
const printContent = editableStory.innerHTML;
const printWindow = window.open('', '_blank');
printWindow.document.write(`
