Closed svalenciano81 closed 2 years ago
hi, i have:
grapesjs: 0.15.8 grapesjs-preset-newsletter: 0.2.20 ckeditor.js: 4 grapesjs-plugin-ckeditor - 0.0.9
i need that all links ( "A" tag ), automatically, has always same styles by default (css inlne), for example:
<a href="#" style="text-decoration:none; color:red!important!">one link </a> how i can do it?
<a href="#" style="text-decoration:none; color:red!important!">one link </a>
I'm trying this:
editor = grapesjs.init({ canvasCss: ' a{color:red!important;text-decoration: none!important;}',
in canvas seems works fine when i insert the link, but when i get html+css inline with:
var html = $scope.editor.runCommand('gjs-get-inlined-html'); the CSS of links are not inline
var html = $scope.editor.runCommand('gjs-get-inlined-html');
any idea?
Instead of canvasCss you should try using protectedCss which is included in the export
canvasCss
protectedCss
hi, i have:
grapesjs: 0.15.8 grapesjs-preset-newsletter: 0.2.20 ckeditor.js: 4 grapesjs-plugin-ckeditor - 0.0.9
i need that all links ( "A" tag ), automatically, has always same styles by default (css inlne), for example:
<a href="#" style="text-decoration:none; color:red!important!">one link </a>
how i can do it?I'm trying this:
in canvas seems works fine when i insert the link, but when i get html+css inline with:
var html = $scope.editor.runCommand('gjs-get-inlined-html');
the CSS of links are not inlineany idea?