TinyPortal

Development => Bugs/Errors => Feedback => Fixed Bugs => Topic started by: wildenborch on April 09, 2018, 06:55:21 PM

Title: SCeditor vs whizziwig editor
Post by: wildenborch on April 09, 2018, 06:55:21 PM
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.

Title: Re: SCeditor vs whizziwig editor
Post by: tino on April 09, 2018, 07:26:36 PM
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?
Title: Re: SCeditor vs whizziwig editor
Post by: wildenborch on April 09, 2018, 07:46:59 PM
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 (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;"

Title: Re: SCeditor vs whizziwig editor
Post by: tino on April 09, 2018, 08:00:42 PM
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?
Title: Re: SCeditor vs whizziwig editor
Post by: wildenborch on April 09, 2018, 08:12:22 PM
Without the padding is also looks very good.
Title: Re: SCeditor vs whizziwig editor
Post by: tino on April 09, 2018, 08:27:29 PM
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.
Title: Re: SCeditor vs whizziwig editor
Post by: wildenborch on April 09, 2018, 08:33:27 PM
Thanks Tino!
Already today!
Title: Re: SCeditor vs whizziwig editor
Post by: wildenborch on April 10, 2018, 09:42:45 AM
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.
Title: Re: SCeditor vs whizziwig editor
Post by: tino on April 10, 2018, 08:22:06 PM
https://www.sceditor.com/documentation/custom-commands/

Is probably a better link and tutorial.
Title: Re: SCeditor vs whizziwig editor
Post by: tino on April 14, 2018, 06:50:27 PM
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.
Title: Re: SCeditor vs whizziwig editor
Post by: wildenborch on April 19, 2018, 09:47:20 AM
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
Title: Re: SCeditor vs whizziwig editor
Post by: tino on April 19, 2018, 07:53:39 PM
Ok, think I have this sorted in the latest push to github for 1.5.0
Title: Re: SCeditor vs whizziwig editor
Post by: tino on April 22, 2018, 04:39:04 PM
You ok with this being moved into fixed bugs?
Title: Re: SCeditor vs whizziwig editor
Post by: wildenborch on April 25, 2018, 06:55:11 PM
Sure i'm ok with that!