TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 18, 2024, 05:30:49 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 203
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 170
  • Total: 170

SCeditor vs whizziwig editor

Started by wildenborch, April 09, 2018, 06:55:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wildenborch

Tino,

What is the reason why you changed the editor into SCeditor. (
Although is really like SCeditor I also miss some things of the Whizziwig editor.
For example how easy it was to change the alignment of the pictures in text.
I found how to accomplish this in SCeditor by adding the following style (style="float: right; margin: 5px 5px 5px 55px;" code in the html editor but I wish it was somewhat easier to do.


tino

I changed it as the SCEditor is more commonly used now and also supports the latest browsers with fewer bugs.

You can align text and images with the editor alignment options, can you show me a example of what isn't working?

wildenborch

Hi Tino,

I want to have the text aligned left from the image.
Just like it is in this example: http://www.karakora.nl/index.php?page=229

In this example the first image is aigned right with the editor aligment option
The second image is aligned with the html code style="float: right; margin: 5px 5px 5px 5px;width: 40%; height: auto;"


tino

The way the old editor did that wasn't actually supported in modern browsers. We can add custom buttons to the editor if required.

https://www.sceditor.com/posts/how-to-add-custom-commands/

What happens if you just float right without the padding?

wildenborch

Without the padding is also looks very good.

tino

I'll look to add a float right and float left for images then, won't be this week.

But I'll add it to my todo list.

wildenborch


wildenborch

#7
Quotehttps://www.sceditor.com/posts/how-to-add-custom-commands/

I looked at this article but I indeed have to wait for your implementations because this is to difficult for me.

tino


tino

Started to play around with this a bit.

Adding this


                        sceditor.command.set(\'maximize\', {
                                exec: function() {
                                        // this is set to the editor instance
                                        var text = this.val();
                                        this.insert(\'<div style="float:left;">\' + text + \'</div>\');
                                },
                                txtExec: [\'<div style="float:left;">\', \'</div>\'],
                                tooltip: \'Insert float left div\'
                        });   


before


var textarea = document.getElementById(\''.$textarea.'\');


Replaces the maximise button with the option to insert a float, only works as I would like in source mode mind. I'll have a look at it again next week if no one else does before that.

wildenborch

Hi Tino,

Thank you already for this.
My apologies for not replying earlier but I was very busy last weekend.
In which file do I have to add this?

Best regards,
Fred

tino

Ok, think I have this sorted in the latest push to github for 1.5.0

tino

You ok with this being moved into fixed bugs?

wildenborch