Hi,
I'm planning on writing a UBB-FCK-Editor; For this I need to get the generated HTML to make UBBcode out of it (via RegEx). Now the problem is... to get the code! This doesn't work:
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor('FCKeditor1');
oFCKeditor.BasePath = './FCKeditor/';
//oFCKeditor.ToolbarSet = 'Basic';
oFCKeditor.ReplaceTextarea() ;
}
function parse_html()
{
alert('test');
alert(oFCKeditor.GetXHTML());
}
</script>
<textarea name="FCKeditor1" rows="10" cols="80" style="width: 100%; height: 200px">This is some samle Text</textarea>
<input type="button" onclick="parse_html()" value="Retrieve Code" />
He show's 'test' but nothing more... does anyone have a clue?
I'm planning on writing a UBB-FCK-Editor; For this I need to get the generated HTML to make UBBcode out of it (via RegEx). Now the problem is... to get the code! This doesn't work:
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor('FCKeditor1');
oFCKeditor.BasePath = './FCKeditor/';
//oFCKeditor.ToolbarSet = 'Basic';
oFCKeditor.ReplaceTextarea() ;
}
function parse_html()
{
alert('test');
alert(oFCKeditor.GetXHTML());
}
</script>
<textarea name="FCKeditor1" rows="10" cols="80" style="width: 100%; height: 200px">This is some samle Text</textarea>
<input type="button" onclick="parse_html()" value="Retrieve Code" />
He show's 'test' but nothing more... does anyone have a clue?
RE: Get sourcecode in JavaScript