Forum

Thread tagged as: Addons, Redactor, CKEditor

markitup editor not connected to assets

Back story: I did a find an replace for any comments <!-- --> and replaced them with <!--* *--> but noticed a typo after I did the replace and replaced them again.

After that, I found that something went wrong with my set up of perch and my text_block.html file stopped showing the content. I replaced the core perch files with clean files, I replaced the editor as well. I tried redactor and cannot browse my assets when trying to insert an image. What do I need to do to get the editor to allow me to select an image in my assets files?

Kim Mazzola

Kim Mazzola 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Markitup has never had the capability to browse assets - you can only upload files direct.

Sorry, I was referring to the redactor editor, not markup. But, how can I use an editor (preferably CKEditor) to allow the user to browse images that are already uploaded for use on other pages? Doesn't seem to make sense that I can't use CKEditor or Redactor to browse my assets and choose an image previously uploaded to use on another page.

Right now the user would have to upload the image again. That doesn't make sense. Is there a solution for this?

Drew McLellan

Drew McLellan 2638 points
Perch Support

The solution is to use structure content, not WYSIWYG. That's the entire concept Perch is built around. If you create an image field, the user can pick from uploaded assets. In a WYSIWYG it's a no man's land that is unmanageable by Perch.

In the end that does mean I'm creating a "theme" that the end user must stick to when creating a new page. I wanted to avoid that and give them a bit of freedom to make some sort of decisions on their own. Adding an image to a sidebar when they are populating the region seems like it could easily be inserted with the editor instead of having to create a field for something that may or may not exist. What if they wanted to add a video? I would have to rebuild the template unless I think of everything they might add prior to deploying the site.

I do understand your point on the need for structure. But, would it be something you would consider for the future? It does give a bit more flexibility for the end user.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

You can use Blocks to do what you describe and give users flexibility in terms of the template they choose.

WYSIWYG editors will always be a second class citizen in Perch because you lose most of the ability to do anything useful with your content as soon as you turn it into a big lump of HTML.

;-) got it, thanks. And, I do understand that "big lump of HTML" that the end user can create using a WYSIWYG editor.