1

Okay So I know this may sound like, "What is this guy talking about" but my question is simple, is there anyway to read a .txt file and then add text from there under a < p> or < h> in terms of text so that it is easier to use for people who don't know how to code? I have team members that are writers and authors although none of them know how to code. I want to give them an easy way to redo text in our website. Soo... anyone?

(btw I slowly am starting to like it here ^_^)

Mohammad Al-Ahdal
  • 758
  • 2
  • 8
  • 21
  • 1
    Use a CMS like Wordpress / Joomla, or add a WYSIWYG-Editor to your website. Then they will be able to manage the content without any knowledge of HTML. – Cedric Jul 07 '13 at 21:08
  • @n33dle , Won't that mean that they'll have to log in? I personallay don't want to create a login menu for them because this is a website that will be shown to our sponsors :/ And our team just doesn't prefer it... But thanks anyways ^_^ – Mohammad Al-Ahdal Jul 07 '13 at 21:14
  • 1
    http://www.tinymce.com/ and load your file with server script like php or .net, whatever you are using – Emilio Gort Jul 07 '13 at 21:15

2 Answers2

0

http://www.tinymce.com

and save or load with server script like php or .net, whatever you are using

Emilio Gort
  • 3,475
  • 3
  • 29
  • 44
0

You could use the contenteditable="true" parameter in a div in which you could paste or display the text such as the following example :

<div class='page' style="display:block;" contenteditable="true"></div>

And modify it with the powerful JS function (a little deprecated) execCommand(); Example :

<input type="button" value="B" onclick="document.execCommand('bold', false, '');" style="font-weight:bold"/>
<input type="button" value="I" onclick="document.execCommand('italic', false, '')" style="font-style:italic"/>
<input type="button" value="U" onclick="document.execCommand('underline', false, '')"   style="text-decoration:underline"/>
<input type="button" value="S" onclick="document.execCommand('strikeThrough', false, '')"   style="text-decoration:line-through"/>

That code will change the selected text, for example, if the user pushes the B or bold button, the selected text will be displayed in bold and in the source code of your webpage, there will be some <b></b> tags around the selected text.

Here a list of the function's arguments on MDC

This is an easy way of creating your own WYSIWYG HTML editor. But there are some limits...

Codophage
  • 85
  • 8