Skip to content

Commit

Permalink
Merge pull request #74 from jd-dotlogics/bugfix/code-editor-style-reset
Browse files Browse the repository at this point in the history
Bug fixed that the code editor resets the styles
  • Loading branch information
mjawad096 authored May 26, 2023
2 parents 0fe5d52 + 8f638f0 commit 2c41366
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/assets/editor.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/resources/js/plugins/code-editor/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ export default (editor, opts = {}) => {
btnEdit.className = stylePrefix + 'btn-prim ' + stylePrefix + 'btn-import';
btnEdit.onclick = function () {
let html = (codeViewer.editor.getValue() || '').trim();
let css = editor.getCss();

editor.DomComponents.getWrapper().set('content', '');
editor.setComponents(html);
editor.setStyle(css);

modal.close();

Expand Down
2 changes: 1 addition & 1 deletion webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const mix = require('laravel-mix');
*/

// merge all needed JS into a big bundle file
mix.js('src/resources/js', 'dist/assets/editor.js')
mix.sourceMaps(false, 'source-map').js('src/resources/js', 'dist/assets/editor.js')
.sass('src/resources/scss/gjs.scss','dist/assets/editor.css')
.options({
processCssUrls: false
Expand Down

0 comments on commit 2c41366

Please sign in to comment.