Autor Zpráva
Koblížek
Profil *
Dá se nějak formátovat text v textaree? Tím myslím něco jko FCKEditor. Prostě mi jde o to, jak udělat třeba v textare třeba tučný text vedle normálního, díky všem.
habendorf
Profil
Takže třeba tak, jak je to tady?
Koblížek
Profil *
ne, já chci aby se to už ztučnilo v tý textaree, ještě než to odešlu na .php skript, aby to viděl i uživatel
Plaváček
Profil
co zkusit

textarea {font-weight: bold}

?
wizard
Profil
Je to třeba tady: http://www.spoluzaci.cz/index.py?auth=&disc_ID=2&act=discussion
už to tady někdo řešil, je to nějaký JS s iframem. Ale asi existuje i jednoduší způsob.
habendorf
Profil
Plaváček: Já myslím, že Koblížkovi jde o reakci na nějakou událost - jak udělat třeba v textare třeba tučný text vedle normálního
Šlaha
Profil
Prostě wysiwyg editor
Tata
Profil
Koblížek
Ak to ešte potrebuješ, stiahni si z http://www.spisnet.ic.cz/formular.zip
TooFew
Profil
Tata
Ten link nejede...
DJ Miky
Profil
TooFew
Ten link nejede...

Za půl roku se leccos změní...
swihi
Profil *
Mrknete na toto...Kdysi jsem to od nekud vykuchal. Snad to pomuze, mejte se zatim...www.swihi.com



<html><head>
</head><body>
<div id="editor">
<div id="colorTab">
</div>
<a href="javascript:cmdExec('bold')"><img src="http://1.im.cz/spoluzaci/img/wysiwyg/bold.gif" class="button" title="Tucne"></a>
<a href="javascript:cmdExec('italic')"><img src="http://1.im.cz/spoluzaci/img/wysiwyg/italic.gif" class="button" title="Kurziva"></a>
<a href="javascript:cmdExec('underline')"><img src="http://1.im.cz/spoluzaci/img/wysiwyg/under.gif" class="button" title="Podtrzene"></a>
<a href="javascript:cmdExec('RemoveFormat')"><img src="http://1.im.cz/spoluzaci/img/wysiwyg/remove.gif" class="button" title="Zrusit styly"></a>
<iframe id="iedit" style="background: white none repeat scroll 0%; width: 500px; height: 150px; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"></iframe>
</div>
<textarea cols="60" rows="10" name="content" id="textarea" style="padding: 5px; display: none;"></textarea>


<script type="text/javascript">
var ie = document.all;
var ie5 = document.all && !document.fireEvent && !window.opera;
var nouze = 0
var max_len = 1000;
if (ie5){ var objEdit = frames.iedit }
else { var objEdit = document.getElementById('iedit').contentWindow; }

function init()
{
if (!objEdit || window.opera) { nouzovka(); return; }
document.getElementById("editor").style.display = 'block';
document.getElementById("textarea").style.display = 'none';
objEdit.document.designMode="On";
value = document.getElementById('textarea').value;
if (!value)
value="<p>&nbsp;</p>";
txt = "<html><head><style>p{ margin-bottom:0.7em !important; border:1px dotted #eee;}</style></head>"
txt += "<body style='margin: 5px;'>"+value+"</body></html>"

objEdit.document.open()
objEdit.document.write(txt)
objEdit.document.close()

if (!ie) { objEdit.document.execCommand('useCSS', false, true); }

if(!ie) {
objEdit.document.addEventListener("keyup", cntLen, true);
objEdit.document.addEventListener("change", cntLen, true);
}
else {
objEdit.document.onkeyup = cntLen;
objEdit.document.onchange = cntLen;
}
document.getElementById('textarea').form.onsubmit = for_submit;
cntLen()
}

function nouzovka()
{
nouze = 1
document.getElementById("editor").style.display = 'none'
tx = document.getElementById("textarea")
tx.style.display = 'block'
}
function cmdExec(cmd,opt)
{
if (cmd=='createLink' && !ie) { opt=prompt("Zadejte URL: ", "http://"); }
objEdit.focus();
objEdit.document.execCommand(cmd,false,opt);
objEdit.focus();
cntLen();
}

setTimeout("init()",100);


</script>
</body></html>
Toto téma je uzamčeno. Odpověď nelze zaslat.

0