XF 1.5 thread create editor placeholder

swatme

Well-known member
Hi guys

anyone knows why when I put placeholder="type here" in text area of editor template, it wont show?

i want to have a default text inside the text area when you create thread and it will be gone when user clicks on it. exactly the same what happens in thread title

i tried adding the placeholder="type here" but still it wont show

<xen:if is="{$showWysiwyg}">
<textarea name="{$formCtrlNameHtml}" placeholder="type here" id="{$editorId}_html" class="textCtrl MessageEditor BbCodeWysiwygEditor {$editorOptions.extraClass}" style="display:none; {xen:if $height, 'height: {$height};'}" data-css-url="css.php?style={xen:urlencode $visitorStyle.style_id}&amp;css=editor_contents&amp;d={xen:urlencode $visitorStyle.last_modified_date}" data-dialog-url="index.php?editor/dialog&amp;style={$visitorStyle.style_id}" {xen:if $editorOptions.autoSaveUrl, 'data-auto-save-url="{$editorOptions.autoSaveUrl}"'} {xen:if $editorOptions.json, 'data-options="{xen:escape {xen:helper json, $editorOptions.json}}"'}>{$messageHtml}</textarea>

<noscript><textarea name="{$formCtrlName}" id="{$editorId}" class="textCtrl MessageEditor {$editorOptions.extraClass}" style="{xen:if $height, 'height: {$height};'}">{$message}</textarea></noscript>

<xen:else />
<textarea name="{$formCtrlName}" id="{$editorId}" class="textCtrl MessageEditor {$editorOptions.extraClass}" style="{xen:if $height, 'height: {$height};'}">{$message}</textarea>

</xen:if>

help please... thanks
 
There are three textarea elements in that template. You would need to add your placeholder text to the third one, but this would only affect users who specifically can't use the rich text editor because their device doesn't support it or they have explicitly switched it off.

The first textarea element is only used internally by the Redactor editor to set up the rich text editor.

The second textarea element is only displayed to users who have the rich text editor enabled, but do not have JavaScript enabled in their browser.

It seems like there's no way to specify a placeholder text for users switching between the rich text editor and the BB code editor. There's also no simple way to display a placeholder inside the rich text editor if we don't already display one by default. (It's an internal Redactor config rather than being passed in by the placeholder attribute).
 
Hi chris

currently there no default placeholder text in the textarea. Can you add one the the next version same default placeholder "type your message here..." ?
its will help us make the site more user friendly..

if title textbox has "title here..." then the textarea should also have "message here..."

thanks




There are three textarea elements in that template. You would need to add your placeholder text to the third one, but this would only affect users who specifically can't use the rich text editor because their device doesn't support it or they have explicitly switched it off.

The first textarea element is only used internally by the Redactor editor to set up the rich text editor.

The second textarea element is only displayed to users who have the rich text editor enabled, but do not have JavaScript enabled in their browser.

It seems like there's no way to specify a placeholder text for users switching between the rich text editor and the BB code editor. There's also no simple way to display a placeholder inside the rich text editor if we don't already display one by default. (It's an internal Redactor config rather than being passed in by the placeholder attribute).
 
Top Bottom