override richtext editor size

Permalink 1 user found helpful
I'd like to use something like this:
Loader::element('editor_init');
   Loader::element('editor_config', array('textEditorHeight'=>'320'));
   Loader::element('editor_controls', array('mode'=>'full'));


to initialize tinymce with a specific size.. Is there an official way? Right now it only works if I apply the attached patch..

1 Attachment

Remo
 
JSA1972 replied on at Permalink Reply
Hello Remo

edit:-
<?php
Loader::element('editor_init');
Loader::element('editor_config');
Loader::element('editor_controls', array('mode'=>'full')); ?>
<?php echo $form->textarea('messagetext', $messagetext, array('style' => 'width: 100%; height: 150px', 'class' => 'ccm-advanced-editor'))?>

It is working. When in wysiwyg, put <p> first </p>, no problem but put <p> first </p> <p> second </p>, will problem.

What I have wrong with that?

John
Remo replied on at Permalink Reply
Remo
Where do you put the <p> tag? I don't get what you mean..
JSA1972 replied on at Permalink Reply
Sorry Remo. It is not my clear I thought something wrong with the loaders but I think have found error from the jQuery animate

view.php
<script type="text/javascript">
$(document).ready(function(){
$(".blocktest").delay(1500).animate({
height: '100px'}, "slow", function(){
$(this).html('<span> Test</span><table><tr><td style="padding-top:10px"><?php echo $test; ?></td></tr></table>');
});
});
</script>

When put 'first' paragraph and 'second' paragraph onto WYSIWYG editor but can't update from edit or add.

I hope you do know what this means.
JSA1972 replied on at Permalink Reply
I have thought about jquery replace.

I saw database output :-
<p>first</p>
<p>second</p>

But I want to replace for only one line
<p>first</p><p>second</p>

Can please you or anyone help me?
JSA1972 replied on at Permalink Reply
I have found that use php reg_replace

<?php $replacetext = preg_replace( '/\s+/', ' ', $text) ?>

It is working! I have been solved for nearly four days lol
JSA1972 replied on at Permalink Reply
I have changed to $replacetext = trim( preg_replace( '/\s+/', ' ', $text ) ) for correct. That will convert the input to one continuous line.