Jump to content
UBot Underground

RichText Textbox -- How to Fill?


Recommended Posts

Anyone knows how to fill info into a textbox with rich text (not tinyMCE) features?

 

Here's the source code if it helps:

 

 

<div class="first-field" >

<div formfield="label" class="first-label "><span id="lblDescription" class="required">Description</span></div>

<div class="first-input">

 

<a name="Description"></a>

<div class="input-div">

 

<textarea name="Description" id="hdnDescription"

wrap="soft"

cols="65"

maxlength="100000"

style="width:500; height:240;font-family:arial;"

ondescriptiondest="0"

rows="6"

></textarea>

 

<script type="text/javascript">

if (client.nav || client.ie) {

DOM.getElementById("hdnDescription").style.display = "none";

 

var editorTexts = {

'Style' : '[style]',

'Heading1' : 'Heading 1 <h1\>',

'Heading2' : 'Heading 2 <h2\>',

'Heading3' : 'Heading 3 <h3\>',

'Heading4' : 'Heading 4 <h4\>',

'Heading5' : 'Heading 5 <h5\>',

'Heading6' : 'Heading 6 <h6\>',

'Font' : '',

'Size' : '',

'Bold' : 'Bold',

'Italic' : 'Italic',

'Underline' : 'Underline',

'AlignLeft' : 'Align Left',

'Center' : 'Center',

'AlignRight' : 'Align Right',

'JustifyFull' : 'Justify Full',

'HorizontalRule' : 'Horizontal Rule',

'OrderedList' : 'Ordered List',

'UnorderedList' : 'Unordered List',

'Outdent' : 'Outdent',

'Indent' : 'Indent',

'TextColor' : 'Text Color',

'BackgroundColor' : 'Background Color'

};

}

</script>

<script>

var rteDescriptionObj = new RichTextEdit("Description",MainFormObj,500,200,"","","http://pic.classistatic.com/image/pics/classifieds/wysiwyg_editor/",true,false, false, true, false);

jQuery.data($("#hdnDescription")[0],"descRTE",rteDescriptionObj);

</script>

Link to post
Share on other sites

Anyone knows how to fill info into a textbox with rich text (not tinyMCE) features?

 

Here's the source code if it helps:

 

 

<div class="first-field" >

<div formfield="label" class="first-label "><span id="lblDescription" class="required">Description</span></div>

<div class="first-input">

 

<a name="Description"></a>

<div class="input-div">

 

<textarea name="Description" id="hdnDescription"

wrap="soft"

cols="65"

maxlength="100000"

style="width:500; height:240;font-family:arial;"

ondescriptiondest="0"

rows="6"

></textarea>

 

<script type="text/javascript">

if (client.nav || client.ie) {

DOM.getElementById("hdnDescription").style.display = "none";

 

var editorTexts = {

'Style' : '[style]',

'Heading1' : 'Heading 1 <h1\>',

'Heading2' : 'Heading 2 <h2\>',

'Heading3' : 'Heading 3 <h3\>',

'Heading4' : 'Heading 4 <h4\>',

'Heading5' : 'Heading 5 <h5\>',

'Heading6' : 'Heading 6 <h6\>',

'Font' : '',

'Size' : '',

'Bold' : 'Bold',

'Italic' : 'Italic',

'Underline' : 'Underline',

'AlignLeft' : 'Align Left',

'Center' : 'Center',

'AlignRight' : 'Align Right',

'JustifyFull' : 'Justify Full',

'HorizontalRule' : 'Horizontal Rule',

'OrderedList' : 'Ordered List',

'UnorderedList' : 'Unordered List',

'Outdent' : 'Outdent',

'Indent' : 'Indent',

'TextColor' : 'Text Color',

'BackgroundColor' : 'Background Color'

};

}

</script>

<script>

var rteDescriptionObj = new RichTextEdit("Description",MainFormObj,500,200,"","","http://pic.classistatic.com/image/pics/classifieds/wysiwyg_editor/",true,false, false, true, false);

jQuery.data($("#hdnDescription")[0],"descRTE",rteDescriptionObj);

</script>

 

 

Well so far i never had the problem but i know that for wordpress as an example, you have to be in the iFrame to edit.

 

I think there is a tutorial for iFrame, have a look if it helps.

 

 

Cheers,

Link to post
Share on other sites

if you use Firefox, open up the page in firefox and right click near the box. have it isolate the frame and it will give you a direct link (url) to the frame. If you're lucky, the whole form will be in a single frame.

Link to post
Share on other sites

if you use Firefox, open up the page in firefox and right click near the box. have it isolate the frame and it will give you a direct link (url) to the frame. If you're lucky, the whole form will be in a single frame.

 

This is cool. Thanks, JohnB, I'll try this.

Link to post
Share on other sites

hi can you post the link of that page here?

 

To change iFrame, I've found this page helpful:

http://www.ubotblog.com/ubot-studio-the-change-iframe-body-command/

 

But the formatting of my text is gone...

 

...anybody knows how to space out the text to the next line?

 

For example, my original text is (fills 3 lines):

 

"The quick brown fox

Jumps over the

lazy dog.."

 

But after using the change iFrame command, I'll get this (only 1 line):

 

"The quick brown fox Jumps over the lazy dog.."

 

Anybody knows how to deal with this?

Link to post
Share on other sites

To change iFrame, I've found this page helpful:

http://www.ubotblog.com/ubot-studio-the-change-iframe-body-command/

 

But the formatting of my text is gone...

 

...anybody knows how to space out the text to the next line?

 

For example, my original text is (fills 3 lines):

 

"The quick brown fox

Jumps over the

lazy dog.."

 

But after using the change iFrame command, I'll get this (only 1 line):

 

"The quick brown fox Jumps over the lazy dog.."

 

Anybody knows how to deal with this?

 

 

You would use a $newline constant.

 

Is this:

"The quick brown fox

Jumps over the

lazy dog.."

 

all considered one item? is that in a list?

Link to post
Share on other sites
  • 1 month later...

Was this problem resolved? I've encountered exactly the same issue. There are several carriage returns in the file, and they are stripped out. How do I do a replace on newlines with a new line constant? I've tried this and it doesn't work.

 

Frank

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...