Issue #1457✓ SolvedOpened September 25, 2018by Stejsi2 reactions

Custom asset manager background-image in Style Manager

Quick answerby artf2

@Stejsi inside opts you have onSelect callback which should update stuff in Style Manager. Unfortunately, it only accepts asset (object) as the argument (my bad, I'll make it also understand strings) so, for now you have to do this

Read full answer below ↓

Question

Hello, i want to use custom Asset Manager i am used this solution, ` var assettarget =''; editor.Commands.add('open-assets', { run(editor, sender, opts = {}) { const modal = editor.Modal; const styleManager = editor.styleManager; assettarget = opts.target; modal.setTitle('Add new image'); var $test = $("<iframe style='width: 100%; height: calc(100vh - 60px);' src='http://192.168.0.227:45678/weby/fb/filemanager/dialog.php?editor=tinymce&type=1&lang=cs&popup=0&crossdomain=0&relative_url=0&akey=key&fldr=%2F&5ba947c59de97'>test</iframe>"); $test.on("load", function () { var iframe = $(this).conte...

Answers (2)

👍 Most helpfulartfOctober 2, 2018

@Stejsi inside opts you have onSelect callback which should update stuff in Style Manager. Unfortunately, it only accepts asset (object) as the argument (my bad, I'll make it also understand strings) so, for now you have to do this

lock[bot]October 12, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.