? NPM Resource Changed PR-5.0-dev Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
29 May 2023

Pull Request for Issue # .

supplementary to #40626

Summary of Changes

The settings were set directly into the editor object, now the options interface is used (register)

Testing Instructions

Run npm I and check that the view->source code works as expected (note: npm run build:js is not ok here)

Actual result BEFORE applying this Pull Request

broken

Expected result AFTER applying this Pull Request

Not broken

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@HLeithner

avatar joomla-cms-bot joomla-cms-bot - change - 29 May 2023
Category JavaScript Repository NPM Change
avatar dgrammatiko dgrammatiko - open - 29 May 2023
avatar dgrammatiko dgrammatiko - change - 29 May 2023
Status New Pending
avatar richard67
richard67 - comment - 29 May 2023

Run npm I and check that the view->source code works as expected (note: npm run build:js is not ok here)

@dgrammatiko Why that? And would npm ci also be sufficient and maybe better than npm I?

avatar dgrammatiko
dgrammatiko - comment - 29 May 2023

Why that?

Because the minification of the html file for the plugin is not in the npm run build:js, ref:

/* Create the Highlighter plugin */
// Get the css
let cssContent = await readFile('build/media_source/plg_editors_tinymce/js/plugins/highlighter/source.css', { encoding: 'utf8' });
cssContent = await Postcss([CssNano()]).process(cssContent, { from: undefined });
// Get the JS
let jsContent = await readFile('build/media_source/plg_editors_tinymce/js/plugins/highlighter/source.es6.js', { encoding: 'utf8' });
jsContent = await minify(jsContent, { sourceMap: false, format: { comments: false } });
// Write the HTML file
const htmlContent = `<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script type="module">${jsContent.code}</script>
<style type="text/css">${cssContent.css}</style>
</head>
<body style="height: 100vh"></body>
</html>
`;
await writeFile('media/plg_editors_tinymce/js/plugins/highlighter/source.html', htmlContent, { encoding: 'utf8', mode: 0o644 });

The npm ci should work fine as well

avatar brianteeman brianteeman - test_item - 29 May 2023 - Tested successfully
avatar brianteeman
brianteeman - comment - 29 May 2023

I have tested this item successfully on a2187ff


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40679.

avatar richard67 richard67 - test_item - 29 May 2023 - Tested successfully
avatar richard67
richard67 - comment - 29 May 2023

I have tested this item successfully on a2187ff


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40679.

avatar richard67 richard67 - change - 29 May 2023
Status Pending Ready to Commit
Labels Added: NPM Resource Changed PR-5.0-dev
avatar richard67
richard67 - comment - 29 May 2023

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40679.

avatar richard67 richard67 - edited - 29 May 2023
avatar HLeithner HLeithner - close - 29 May 2023
avatar HLeithner HLeithner - merge - 29 May 2023
avatar HLeithner HLeithner - change - 29 May 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-05-29 13:32:55
Closed_By HLeithner
Labels Added: ?
avatar HLeithner
HLeithner - comment - 29 May 2023

Thanks

avatar HLeithner
HLeithner - comment - 29 May 2023

do we have the codemirror parameters in the codemirror plugin? and can we get the options from this plugin? @dgrammatiko

avatar dgrammatiko
dgrammatiko - comment - 29 May 2023

The parameters are exposed to the php side here: #40682

Add a Comment

Login with GitHub to post a comment