Forum

Thread tagged as: Question

View Source button - html code

Is there a way to add a view source button for the wysiwyg editor please.

Rob Broley

Rob Broley 0 points

  • 7 years ago

Which WYSIWYG editor are you using (the most common is either CKEditor or TinyMCE)?

I am not too sure. How would I find out please?

Drew McLellan

Drew McLellan 2638 points
Perch Support

In your template, you should have an attribute for editor="something" on the field in question. What does it say?

Its just the standard Text Block template. Its does not seem to have an editor= tag.

Drew McLellan

Drew McLellan 2638 points
Perch Support

The default editor is MarkItUp. You can't view source, as you're already viewing the source.

Drew McLellan said:

The default editor is MarkItUp. You can't view source, as you're already viewing the source.

Thanks Drew. So how would I change that please to add a view source button? Its so I can copy my html into the text block

Add html="true" to the perch tag then you will be able to paste html into the text editor.

fyi Redactor provides a 'view html' as part of the standard toolbar

Tried changing the editor from markitup to the ones mentioned and nothing happens.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

What steps have you followed to change the editor? Please show us the template in question as well.

Rachel Andrew said:

What steps have you followed to change the editor? Please show us the template in question as well.

Hi Rachel,

I have modified the default text-block.html template

<perch:content id="text" type="textarea" label="Text" markdown="true" editor="markitup" imagewidth="640" imageheight="480" />

And want to change the editor I have tried Redactor but nothing happens the style at the top where it has the alignment and text options disappears so I have resorted to the markitup editor.

I know you have to purchase redactor but I was just wondering if you had any other options that where free.

Thanks

Rob

Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you actually installed Redactor?